oracle 檢視錶空間使用情況

mhabbyo發表於2016-11-22
檢視錶空間分佈

select total.tablespace_name,round(total.MB, 2) as Total_MB,round(total.MB - free.MB, 2) as Used_MB,round((1 - free.MB / total.MB) * 100, 2) || '%' as Used_Pct
from (select tablespace_name, sum(bytes) / 1024 / 1024 as MB
from dba_free_space
group by tablespace_name) free,
(select tablespace_name, sum(bytes) / 1024 / 1024 as MB
from dba_data_files
group by tablespace_name) total
where free.tablespace_name = total.tablespace_name;


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29291882/viewspace-2128872/,如需轉載,請註明出處,否則將追究法律責任。

相關文章