oracle中关于undo表空间的使用

来源:互联网 发布:淘宝客服工作感想 编辑:程序博客网 时间:2024/06/05 03:26

在监控undo表空间的使用中,发现
select sum(bytes/(1024*1024)) from dba_undo_extents;
select sum(bytes/(1024*1024)) from dba_extents where tablespace_name=’UNDOTBS1’;
select owner,segment_name,bytes/1024/1024 mb from dba_segments where tablespace_name=’UNDOTBS1’;
这三个视图统计的大小一致,值比较小与
select bytes/(1024*1024),maxbytes/(1024*1024) from dba_data_files where tablespace_name=’UNDOTBS1’;
这个语句统计的相差很多

上面三个应该都是统计的online的回滚段
select * from DBA_ROLLBACK_SEGS;这个视图是显示的所有的回滚段信息。
下面的语句可以看到很多的回滚段是offline的
select t1.* from DBA_ROLLBACK_SEGS t1,dba_undo_extents t2 where t1.segment_name<>t2.segment_name;
在自动回滚段管理的情况下,oracle会自动的将回滚段online或offline。

原创粉丝点击