您的位置:首页 > 数据库

DBA常用sql语句-查询表空间大小语句

2005-12-23 17:00 573 查看
查询表空间大小语句
 select a.file_id   文件号,
        a.tablespace_name  表名,
        b.bytes            表大小,
        (b.bytes-sum(nvl(a.bytes,0)))  剩余大小,
        sum(nvl(a.bytes,0))            使用大小,
        sum(nvl(a.bytes,0))/b.bytes*100   剩余百分比
 from  dba_free_space a,dba_data_files b
 where a.file_id=b.file_id
 group by a.tablespace_name,a.file_id,b.bytes
 order by a.file_id
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql