在oracle查看可用表空间
- SELECT a.tablespace_name, a.BYTES total, a.bytes - nvl(b.bytes, 0) free
- FROM (SELECT tablespace_name, SUM (decode(autoextensible,'YES',MAXBYTES,BYTES)) bytes FROM dba_temp_files GROUP BY tablespace_name) a,
- (SELECT tablespace_name, SUM (bytes_cached) bytes FROM v$temp_extent_pool GROUP BY tablespace_name) b
- WHERE a.tablespace_name = b.tablespace_name
用decode语句就是用来判断 临时表空间是否是自动扩展的
与临时表空间相关的主要视图有:dba_temp_files,v$temp_extent_pool ,v$temp_space_header,v$sort_segment
阅读(1884) | 评论(0) | 转发(0) |