0
点赞
收藏
分享

微信扫一扫

Oracle 查看表空间

惠特曼 2022-02-20 阅读 92
select tablespace_name,total_mb,used_mb,free_mb,used_pct from (
 select t.tablespace_name,t.total_mb,t.total_mb-f.total_free_mb used_mb,total_free_mb free_mb,
 to_char((1-(f.total_free_mb/t.total_mb))*100,'990.99')||'%' as used_pct
 from
 (select tablespace_name,round(sum(bytes)/(1024*1024)) total_mb 
 from dba_data_files group by tablespace_name) t,       
 (select tablespace_name,round(sum(bytes)/(1024*1024)) total_free_mb    
 from dba_free_space group by tablespace_name) f        
 where t.tablespace_name = f.tablespace_name
 );
举报

相关推荐

0 条评论