百度首页 | 百度空间
 
查看文章
 
何察看表空间的使用情况
2008-01-16 13:45
使用命令查看数据文件实际使用的大小和占有率

检查剩余空间
select sum(bytes)/(1024*1024) as free_space,tablespace_name
from dba_free_space
group by tablespace_name;
检查总共容量
Select bytes/(1024*1024) as total_space,name
from v$datafile;

显示百分比
select A.tablespace_name,(1-(A.total)/B.total)*100 used_percent
from (select tablespace_name,sum(bytes) total
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 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码:
 

     

©2008 Baidu