ITPub博客

首页 > 数据库 > Oracle > oracle 查看表空间使用情况

oracle 查看表空间使用情况

原创 Oracle 作者:mhabbyo 时间:2016-11-22 15:52:54 0 删除 编辑
查看表空间分布

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;


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

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

注册时间:2013-12-23

  • 博文量
    56
  • 访问量
    136412