您的位置:首页 > 数据库 > Oracle

Oracle 检查表空间使用情况

2016-11-24 15:31 309 查看
--检查表空间使用情况
SELECT f.tablespace_name
, a.total "total (M)"
, f.free "free (M)"
, ROUND ( (f.free / a.total) * 100) "% Free"
FROM ( SELECT tablespace_name, SUM (bytes / (1024 * 1024)) total
FROM dba_data_files
GROUP BY tablespace_name) a
, ( SELECT tablespace_name, ROUND (SUM (bytes / (1024 * 1024))) free
FROM dba_free_space
GROUP BY tablespace_name) f
WHERE a.tablespace_name = f.tablespace_name(+)
ORDER BY "% Free";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: