最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

Oracle11gR2DatabaseUNDO表空间使用率居高不下

来源:懂视网 责编:小采 时间:2020-11-09 14:28:05
文档

Oracle11gR2DatabaseUNDO表空间使用率居高不下

Oracle11gR2DatabaseUNDO表空间使用率居高不下:客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FREE_SPACE发现UNDO表空间的使用率高达 客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FR
推荐度:
导读Oracle11gR2DatabaseUNDO表空间使用率居高不下:客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FREE_SPACE发现UNDO表空间的使用率高达 客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FR

客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FREE_SPACE发现UNDO表空间的使用率高达

客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FREE_SPACE发现UNDO表空间的使用率高达98%以上。客户的UNDO表空间已经手动扩展到了25GB,且一直在增加,为了UNDO表空间能及时的被释放,UNDO表空间对应的所有数据文件自动扩展都被关闭。查询DBA_UNDO_EXTENTS发现在UNDO表空间中当前没有ACTIVE的EXTENT存在,UNEXPIRED的占到总空间的60%,有30%是EXPIRED,但Oracle并没有及时的释放这些空间。

客户的UNDO表空间并没有设置成GUARANTEE模式,所以根据我们的知识都明白UNDO表空间中的EXPIRED和UNEXPIRED都是可能被重用的,但是这么高的UNDO表空间使用率看着让人不踏实。

虽然我们在初始化参数中设置了UNDO_RETENTION等参数,但从Oracle 10gR2开始,默认Oracle都开启了UNDO表空间的自动调整功能,查找V$UNDOSTAT.TUNED_UNDORETENTION发现最近一段时间该值都被自动调整到了3500多分钟,也就是说UNDO表空间中的数据要保留接近3天才会过期,正是因为这么长的数据未过期时间,且表空间又足够的大,才导致了UNDO表空间的空间一致未被释放,同时也找到了Oracle下面的一段解释:


Why TUNED_UNDORETENTION is calculated so high making undo space grow fast ?

When non-autoextensible undo space is used, tuned_undoretention is calculated based on a percentage of the undo tablespace size. In some cases especially with large undo tablespace, This will make it to be calculated so large.

To fix this behaviour, Set the following instance parameter:

_smu_debug_mode=33554432

With this setting, TUNED_UNDORETENTION is not calculated based on a percentage of the fixed size undo tablespace. Instead it is set to the maximum of (MAXQUERYLEN secs + 300) and UNDO_RETENTION.

简单的说,就是当UNDO表空间对应的数据文件非自动扩展,,且UNDO表空间又比较大的时候,tuned_undoretention的值是根据UNDO表空间大小的百分比来计算的,在一些情况下会将tuned_undoretention的值调整得特别大。

解决办法,如果设置_smu_debug_mode=33554432,那么Oracle的UNDO RETENTION自动调整功能依然被开启,但是计算tuned_undoretention是根据MAXQUERYLEN secs +300来计算,而不是根据UNDO表空间大小的百分比来计算,这样就可以避免TUNED_UNTORETENTION出现特别大的值。

以上内容摘自:《FAQ – Automatic Undo Management (AUM) / System Managed Undo (SMU) (Doc ID 461480.1)》。

同样我们还参考了另一篇文章:

Automatic Tuning of Undo_retention Causes Space Problems (Doc ID 420525.1)


In this Document

Symptoms

Cause

Solution

References

Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.4 to 10.2.0.4 [Release 10.2]
Information in this document applies to any platform.
Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.3 -- fixed by patchset 10.2.0.4 and no issues on this at 11g

*** Checked for currency: 13-SEP-2012 ***


Symptoms

You have verified that Document 413732.1 is not applicable and the problem is not a misunderstanding in the way EXPIRED/UNEXPIRED are used and reused over time.

Look for:
1. Whether the undo is automatically managed by the database by checking the following instance parameter:

UNDO_MANAGEMENT=AUTO

2. Whether the undo tablespace is fixed in size:

SQL> SELECT autoextensible
FROM dba_data_files
WHERE tablespace_name=''

This returns "NO" for all the undo tablespace datafiles.
3. The undo tablespace is already sized such that it always has more than enough space to store all the undo generated within the undo_retention time, and the in-use undo space never exceeds the undo tablespace warning alert threshold (see below for the query to show the thresholds).
4. The tablespace threshold alerts recommend that the DBA add more space to the undo tablespace:

SQL> SELECT creation_time, metric_value, message_type, reason, suggested_action
FROM dba_outstanding_alerts
WHERE object_name='';

This returns a suggested action of: "Add space to the tablespace".

Or,

This recommendation has been reported in the past but the condition has now cleared:

SQL> SELECT creation_time, metric_value, message_type, reason, suggested_action, resolution
FROM dba_alert_history
WHERE object_name='';

5. The undo tablespace in-use space exceeded the warning alert threshold at some point in time. To see the warning alert percentage threshold, issue:

SQL> SELECT object_type, object_name, warning_value, critical_value
FROM dba_thresholds
WHERE object_type='TABLESPACE';

To see the (current) undo tablespace percent of space in use:

SQL> SELECT
((SELECT (NVL(SUM(bytes),0))
FROM dba_undo_extents
WHERE tablespace_name=''
AND status IN ('ACTIVE','UNEXPIRED')) * 100)/
(SELECT SUM(bytes)
FROM dba_data_files
WHERE tablespace_name='')
"PCT_INUSE"
FROM dual;


Cause

The cause of this problem has been identified in:
Bug:5387030 - AUTOMATIC TUNING OF UNDO_RETENTION CAUSING SPACE PROBLEMS

It is caused by a wrong calculation of the tuned undo retention value.

Bug:5387030 is fixed in RDBMS 11.1.

Solution

To implement a solution for Bug:5387030, please execute any of the below alternative solutions:
• Upgrade to 11.1 in which Bug:5387030 is fixed

OR
• Apply patchset release 10.2.0.4 or higher in which Bug:5387030 is fixed.

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

Oracle11gR2DatabaseUNDO表空间使用率居高不下

Oracle11gR2DatabaseUNDO表空间使用率居高不下:客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FREE_SPACE发现UNDO表空间的使用率高达 客户的数据库是Oracle Database 11.2.0.3.0 for AIX 6.1 64bit的单机数据库。客户查询DBA_FR
推荐度:
标签: 11 数据库 使用率
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top