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

Oracle 查询表空间使用情况SQL

2007-04-02 15:41 501 查看
select a.file_id "FileNo",a.tablespace_name
"Tablespace_name",
a.bytes "Bytes",a.bytes-sum(nvl(b.bytes,0)) "Used",
sum(nvl(b.bytes,0)) "Free",
sum(nvl(b.bytes,0))/a.bytes*100 "%free"
from dba_data_files a, dba_free_space b
where a.file_id=b.file_id(+)
group by a.tablespace_name ,
a.file_id,a.bytes order by a.tablespace_name;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: