Oracle查询表空间使用情况的一个sql

select  t1.tablespace_name,curr_b/1024/1024/1024,max_b/1024/1024/1024,curr_b/max_b from
(select tablespace_name,sum(maxbytes) max_b from dba_data_files group by tablespace_name) t1
join
(select tablespace_name,sum(bytes) curr_b from dba_segments group by tablespace_name) t2 on t1.tablespace_name=t2.tablespace_name

以上

上一篇:oracle查询表空间的位置


下一篇:python走起之第八话