梦幻之旅

DEBUG - 天道酬勤

   :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  671 随笔 :: 6 文章 :: 256 评论 :: 0 Trackbacks
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_data_files group by tablespace_name
union all
select tablespace_name,sum(bytes)/1024/1024/1024 GB
from dba_temp_files group by tablespace_name order by GB;


select 
b.
file_id file_id
b.tablespace_name, 
b.bytes, 
b.maxbytes,
(b.bytes
-sum(nvl(a.bytes,0))) used, 
sum(nvl(a.bytes,0)) unused, 
sum(nvl(a.bytes,0))/(b.bytes)*100 percentage 
from dba_free_space a,dba_data_files b 
where a.file_id=b.file_id 
group by b.tablespace_name,b.file_id,b.bytes,b.maxbytes
order by b.file_id;
posted on 2011-04-19 13:09 HUIKK 阅读(190) 评论(0)  编辑  收藏 所属分类: DataBase

只有注册用户登录后才能发表评论。


网站导航: