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查看表空间使用率
 

 

相关文章:

  • 2021-12-22
  • 2021-12-07
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
猜你喜欢
  • 2021-12-15
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案