1 2 3 4 5 6 7 8 9 10 11 12 13
| select a.tablespace_name "表空间名称", round(a.max / 1024 / 1024 / 1024) "表空间名称", round(a.bytes / 1024 / 1024 / 1024, 2) "目前表空间总大小", round((a.bytes - b.bytes) / 1024 / 1024 / 1024, 2) "已使用空间大小", round(b.bytes / 1024 / 1024 / 1024, 2) "剩余表空间大小", round(((a.bytes - b.bytes) / a.bytes) * 100, 2) || '%' "使用率 %" from (select tablespace_name, sum(bytes) bytes, sum(decode(maxbytes, 0, bytes, maxbytes)) max from dba_data_files group by tablespace_name) a, (select tablespace_name, sum(bytes) bytes, max(bytes) largest from dba_free_space group by tablespace_name) b where a.tablespace_name = b.tablespace_name and (((a.bytes - b.bytes) / a.bytes) * 100) > 95 order by 5, 1;
|