欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

oracle查看表空间使用率

程序员文章站 2022-05-07 21:02:03
...
select total.tablespace_name,
       round(total.MB, 2) as Total_MB,
       round(total.MB - free.MB, 2) as Used_MB,
       round((1 - free.MB / total.MB) * 100, 2) as Used_Pct
  from (select tablespace_name, sum(bytes) / 1024 / 1024 as MB
          from dba_free_space
         group by tablespace_name) free,
       (select tablespace_name, sum(bytes) / 1024 / 1024 as MB
          from dba_data_files
         group by tablespace_name) total
 where free.tablespace_name = total.tablespace_name;

 
oracle查看表空间使用率
            
    
    博客分类: 数据库 oralce表空间 
 

 

  • oracle查看表空间使用率
            
    
    博客分类: 数据库 oralce表空间 
  • 大小: 31.2 KB
相关标签: oralce 表空间