• 点击这里给我发消息
  • 点击这里给我发消息
设为首页 \ 加入收藏    
您现在的位置: 主页 > 技术支持 >
技术支持
新闻资讯
产品中心
解决方案
成功案例
技术支持
关于我们
联系我们
联系我们
西安卓识信息科技有限公司
电话:029-88190617
地址:陕西省西安市科技路1号
主页:http://www.soft-zs.com
联系人:刘女士
电话:13379501476
QQ:408472479
 
技术支持
标题: ORACLE查询表空间数据文件使用率
[发表时间: 2020-06-27 21:17 ] |[浏览:次]
ORACLE通过如下语句查询数据文件使用率:

select * from (
Select a.tablespace_name,
to_char(a.bytes/1024/1024,'99,999.999') total_bytes,
to_char(b.bytes/1024/1024,'99,999.999') free_bytes,
to_char(a.bytes/1024/1024 - b.bytes/1024/1024,'99,999.999') use_bytes,
to_char((1 - b.bytes/a.bytes)*100,'99.99') || '%'use
from (select tablespace_name,
sum(bytes) bytes
from dba_data_files
group by tablespace_name) a,
(select tablespace_name,
sum(bytes) bytes
from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name
union all
select c.tablespace_name,
to_char(c.bytes/1024/1024,'99,999.999') total_bytes,
to_char( (c.bytes-d.bytes_used)/1024/1024,'99,999.999') free_bytes,
to_char(d.bytes_used/1024/1024,'99,999.999') use_bytes,
to_char(d.bytes_used*100/c.bytes,'99.99') || '%'use
from
(select tablespace_name,sum(bytes) bytes
from dba_temp_files group by tablespace_name) c,
(select tablespace_name,sum(bytes_cached) bytes_used
from v$temp_extent_pool group by tablespace_name) d
where c.tablespace_name = d.tablespace_name
)
order by tablespace_name
+ 上一篇:ORACLE查询表依赖关系
+ 下一篇:SQL2008可疑数据库的一般性修复
 
西安卓识信息科技有限公司 版权所有【陕ICP备11007810号】