ITPub博客

首页 > 数据库 > 数据库开发技术 > 【转】查询表空间中的数据文件利用率的sql

【转】查询表空间中的数据文件利用率的sql

原创 数据库开发技术 作者:msdnchina 时间:2011-08-01 21:15:47 0 删除 编辑

select
b.file_name "物理文件名",
b.tablespace_name "表空间",
b.bytes/1024/1024 "大小M",
(b.bytes-sum(nvl(a.bytes,0)))/1024/1024 "已使用M",
substr((b.bytes-sum(nvl(a.bytes,0)))/(b.bytes)*100,1,5) "利用率"
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_name,b.bytes
order by b.tablespace_name[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/161195/viewspace-1053302/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-07-30

  • 博文量
    498
  • 访问量
    1542535