ITPub博客

首页 > 数据库 > Oracle > ORACLE查询所有表空间使用情况

ORACLE查询所有表空间使用情况

原创 Oracle 作者:muxinqing 时间:2015-05-08 13:00:40 0 删除 编辑

select t.tablespace_name "表空间名称",t.full_space "总的 M",(t.full_space-nvl(f.free_space,0)) "使用 M",f.free_space "剩余 M",to_char(round((t.full_space-nvl(f.free_space,0))/t.full_space*100,1),'fm999990.99999')||'%' "使用率"from (select tablespace_name,round(sum(bytes)/(1024*1024),2) free_space from dba_free_space group by tablespace_name) f ,
(select tablespace_name,round(sum(bytes)/(1024*1024),2) full_space from dba_data_files group by tablespace_name) t where f.tablespace_name=t.tablespace_name(+)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29065182/viewspace-1629541/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-01-14

  • 博文量
    143
  • 访问量
    1248175