ITPub博客

首页 > 数据库 > Oracle > oracle数据库相关数据的查询

oracle数据库相关数据的查询

原创 Oracle 作者:alimzhao 时间:2010-12-16 10:07:21 0 删除 编辑
oracle数据库中的表空间和数据对象的大小查询![@more@]

--各个表空间
Select m.tablespace_name ,Sum(m.bytes)/1024/1024 From Dba_Segments m
where m.tablespace_name in('CUSLOGIDX','CUSLOG')
Group By m.Tablespace_Name
--各个数据对象的大小
select t.segment_name,t.partition_name,t.segment_type,t.tablespace_name,bytes/(1024*1024) as "size(M)" from user_segments t
--where t.segment_name='G_CUSTOMER_LOG'
where t.segment_type in ('TABLE','TABLE PARTITION')
order by t.segment_type,bytes/(1024*1024)

select t.tablespace_name,t.segment_name,sum(bytes)/(1024*1024) as "size(M)" from user_segments t
--where t.segment_name in ('G_CUSTOMER_LOG','G_CUSTOMER_TMP')
where t.tablespace_name in('CUSLOGIDX','CUSLOG')
group by t.tablespace_name,t.segment_name

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

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

注册时间:2010-02-06

  • 博文量
    35
  • 访问量
    307133