ORACLE查詢所有表空間使用情況

muxinqing發表於2015-05-08

select t.tablespace_name "表空間名稱",t.full_space "總的 M",(t.full_space-nvl(f.free_space,0)) "使用 M",f.free_space "剩餘 M",to_char(round((t.full_space-nvl(f.free_space,0))/t.full_space*100,1),'fm999990.99999')||'%' "使用率"from (select tablespace_name,round(sum(bytes)/(1024*1024),2) free_space from dba_free_space group by tablespace_name) f ,
(select tablespace_name,round(sum(bytes)/(1024*1024),2) full_space from dba_data_files group by tablespace_name) t where f.tablespace_name=t.tablespace_name(+)

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

相關文章