SELECT
t1
表空间
,
z/ 1024 / 1024 总表空间 ,
(z - s)/ 1024 / 1024 已用表空间 ,
s/ 1024 / 1024 剩余表空间 ,
ROUND((z - s) / z * 100 , 2 )|| '%' " 使用率 %"
From ( Select tablespace_name t1, Sum (bytes) s From DBA_FREE_SPACE Groupby tablespace_name),
( Select tablespace_name t2, Sum (bytes) z From DBA_DATA_FILES Groupby tablespace_name)
Where t1 = t2
orderby 1 ;
z/ 1024 / 1024 总表空间 ,
(z - s)/ 1024 / 1024 已用表空间 ,
s/ 1024 / 1024 剩余表空间 ,
ROUND((z - s) / z * 100 , 2 )|| '%' " 使用率 %"
From ( Select tablespace_name t1, Sum (bytes) s From DBA_FREE_SPACE Groupby tablespace_name),
( Select tablespace_name t2, Sum (bytes) z From DBA_DATA_FILES Groupby tablespace_name)
Where t1 = t2
orderby 1 ;