SELECT a.tablespace_name "表空间名",
a.bytes / 1024 / 1024/1024 "表空间大小(G)",
(a.bytes - b.bytes) / 1024 / 1024/1024 "已使用空间(G)",
b.bytes / 1024 / 1024/1024 "空闲空间(G)",
round(((a.bytes - b.bytes) / a.bytes) * 100, 2) "使用比"
FROM (SELECT tablespace_name, sum(bytes) bytes
FROM dba_data_files
GROUP BY tablespace_name) a,
(SELECT tablespace_name, sum(bytes) bytes, max(bytes) largest
FROM dba_free_space
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
ORDER BY ((a.bytes - b.bytes) / a.bytes) DESC;
oracle查看表空间大小
最新推荐文章于 2024-07-25 10:50:39 发布