成都网站建设设计

将想法与焦点和您一起共享

如何检查Undo表空间使用情况

小编给大家分享一下如何检查Undo表空间使用情况,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

我们提供的服务有:成都网站制作、网站建设、微信公众号开发、网站优化、网站认证、新都ssl等。为数千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的新都网站制作公司

######脚本###########

SELECT TABLESPACE_NAME, ROUND ( (USED / TOTAL_SIZE) * 100, 2) USED_RATE
  FROM (SELECT A.TABLESPACE_NAME, TOTAL_SIZE, USED
          FROM (  SELECT TABLESPACE_NAME,
                         ROUND (SUM (BYTES) / 1024 / 1024 / 1024, 2) TOTAL_SIZE
                    FROM DBA_DATA_FILES
                   WHERE 1 = 1 AND TABLESPACE_NAME LIKE 'UNDOTBS%'
                GROUP BY TABLESPACE_NAME) A,
               (  SELECT TABLESPACE_NAME,
                         ROUND (SUM (BYTES) / 1024 / 1024 / 1024, 2) USED
                    FROM DBA_UNDO_EXTENTS
                   WHERE 1 = 1 AND STATUS = 'UNEXPIRED'
                GROUP BY TABLESPACE_NAME) B
         WHERE 1 = 1 AND A.TABLESPACE_NAME = B.TABLESPACE_NAME);

------------------------------------------------------------------------------------------------------------------

The Expired blocks will be reused and hence this should be counted as 'available' space in the Undo segment.

You can check the status of the undo extents via the SQLs below.
select sum(bytes /(1024*1024)) from dba_undo_extents where status='EXPIRED';
select sum(bytes /(1024*1024)) from dba_undo_extents where status='ACTIVE';
select sum(bytes /(1024*1024)) from dba_undo_extents where status='UNEXPIRED';

For more detailed information, please refer to:
Master Note: High Undo Space Usage ( Doc ID 1578639.1 )

Above all, if the undo status is Expired, you can safely ignore the undo usage, as the space will be reused automatically.

以上是“如何检查Undo表空间使用情况”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注创新互联行业资讯频道!


网站题目:如何检查Undo表空间使用情况
网址分享:http://chengdu.cdxwcx.cn/article/ihcggc.html