SELECT
A.tablespace_name 表空间,
A.file_name 物理文件名,
A.bytes / 1024 / 1024 / 1024"当前大小(G)",
(A.bytes - b.free) / 1024 / 1024 / 1024"已使用(G)",
round(((A.bytes - b.free) / (A.bytes)) * 100,2) "使用率(%)",
case A.autoextensible when 'YES' then '是' else '否' end 是否自增,
A.maxbytes / 1024 / 1024 /1024 "自增最大容量(G)"
FROM (SELECT * FROM dba_data_files) A
LEFT JOIN (select file_id,sum(nvl(bytes,0)) free FROM dba_free_space group by file_id) B ON A.file_id = B.file_id
ORDER BY A.tablespace_name;
oracle数据库表空间占用情况查询
最新推荐文章于 2024-04-28 16:15:24 发布