select
fs.tablespace_name "Tablespace",
(df.totalspace - fs.freespace) "Used MB",
fs.freespace "Free MB",
df.totalspace "Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free",
(df.totalspace - fs.freespace) "Pct. Used"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Mr.Y 的頭像
    Mr.Y

    航向新世界

    Mr.Y 發表在 痞客邦 留言(0) 人氣()