码迷,mamicode.com
首页 > 数据库 > 详细

oracle 查看表空间使用率

时间:2015-11-10 12:22:02      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:

2015-11-10

查看表空间总容量

select tablespace_name, sum(bytes) / 1024 / 1024 as MB from dba_data_files group by tablespace_name;

查看表空间使用率

SELECT a.tablespace_name,total,free, (total-free),total/(1024*1024*1024),free/(1024*1024*1024) "free(G)",(total-free)/(1024*1024*1024) "(total-free)(G)",round((total-free)/total,4)*100 "ratio %" FROM (SELECT tablespace_name, SUM(bytes) free FROM dba_free_space GROUP BY tablespace_name) a,(SELECT tablespace_name,SUM(bytes) total FROM dba_data_files GROUP BY tablespace_name) b WHERE a.tablespace_name = b.tablespace_name ;

 

oracle 查看表空间使用率

标签:

原文地址:http://www.cnblogs.com/cenliang/p/4952410.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!