select b.tablespace_name 表空间名M,
b.file_name 数据文件,
b.bytes/1024/1024 总共大小M,
(B.BYTES-SUM(NVL(A.BYTES,0)))/1024/1024 以使用空间M,
sum(nvl(a.bytes,0))/1024/1024 剩余空间M,
sum(nvl(a.bytes,0))/(b.bytes)*100 以使用百分比,
(100-(sum(nvl(a.bytes,0))/(b.bytes)*100)) 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_name,b.file_id,b.bytes
order by b.tablespace_name
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15678730/viewspace-586829/
,如需转载,请注明出处,否则将追究法律责任。