select a.tablespace_name tablespace_name
,nvl(ceil((1 - b.free / a.total) * 100), 100) "usage_of_tablespace%"
,nvl(b.free, 0) "left_space(M)"
,c.extent_management "Extent_management"
from (select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 total
from dba_data_files
group by tablespace_name) a
,(select tablespace_name, sum(nvl(bytes, 0)) / 1024 / 1024 free
from dba_free_space
group by tablespace_name) b
,dba_tablespaces c
where a.tablespace_name = c.tablespace_name
and c.tablespace_name = b.tablespace_name(+);
以上所述是小編給大家介紹的Oracle表空間查看sql使用情況的相關(guān)知識,希望對大家有所幫助,如果大家想了解更多資訊敬請關(guān)注腳本之家網(wǎng)站!