Oracle Tablespace 空間查詢

摘要:Oracle Tablespace 空間查詢

select a.TABLESPACE_NAME, to_char(a.BYTES/(1024*1024),'999,999') "Size(MB)", to_char(round((a.BYTES-b.BYTES)/(1024*1024),0),'999,999') "Used(MB)", to_char(b.BYTES/(1024*1024),'999,999') "Avail(MB)" from (select TABLESPACE_NAME, sum(BYTES) "BYTES" from dba_data_files group by tablespace_name) a, (select TABLESPACE_NAME,sum(BYTES) "BYTES" from dba_free_space group by tablespace_name) b where a.TABLESPACE_NAME=b.TABLESPACE_NAME; 

 

 

ref