Oracle 檢查表空間使用情況

xypincle發表於2017-04-12

  1. select f.tablespace_name,
  2.        a.total "total (M)",
  3.        f.free "free (M)",
  4.        round((f.free / a.total) * 100) "% Free"
  5.   from (select tablespace_name, sum(bytes / (1024 * 1024)) total
  6.           from dba_data_files
  7.          group by tablespace_name) a,
  8.        (select tablespace_name, round(sum(bytes / (1024 * 1024))) free
  9.           from dba_free_space
  10.          group by tablespace_name) f
  11.  where a.tablespace_name = f.tablespace_name(+)
  12.  order by "% Free";

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

相關文章