select  dbf.tablespace_name,dbf.totalspace "总量(M)",dbf.totalblocks as 总块数,dfs.freespace "剩余总量(M)",dfs.freeblocks "剩余块数",(dfs.freespace / dbf.totalspace) * 100 "空闲比例" from (select t.tablespace_name,sum(t.bytes) / 1024 / 1024 totalspace,sum(t.blocks) totalblocks 
 from dba_data_files t group by t.tablespace_name) dbf,
 (select tt.tablespace_name,sum(tt.bytes) / 1024 / 1024 freespace,sum(tt.blocks) freeblocks 
 from dba_free_space tt group by tt.tablespace_name) dfs 
 where trim(dbf.tablespace_name) = trim(dfs.tablespace_name)
 

 

相关文章:

  • 2021-10-01
  • 2022-01-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-10-30
  • 2021-11-29
  • 2021-10-08
  • 2022-12-23
相关资源
相似解决方案