ORA-30036故障解决方法案例

References
Bug:5387030 (This link will only work for PUBLISHED bugs)
Note:245840.1 Information on the sections in this article
我们的数据库版本为10.2.0.5.0满足其Versions >= 10.2.0.1 but BELOW 11.1的条件。对于固定UNDO 表空间,将会通过表空间的剩余空间来最大限度保留UNDO 信息。如果FIXED UNDO 表空间没有对保留时间作GUARANTEE (alter tablespace xxx retention guarantee; ),则undo_retention 参数将不会起作用。(警告:如果设置UNDO 表空间为retention guarantee ,则未过期的数据不会被复写,如果表空间不够则会导致DML 操作失败或者transation 挂起)
  oracle 10g有自动Automatic Undo Retention Tuning 这个特性。设置的undo_retention 参数只是一个指导值, ,Oracle 会自动调整Undo ( 会跨过undo_retention 设定的时间) 来保证不会出现Ora-1555 错误. 。通过查询V$UNDOSTAT (该视图记录4 天以内的UNDO 表空间使用情况,超过4 天可以查询DBA_HIST_UNDOSTAT 视图) 的tuned_undoretention (该字段在10G 版本才有,9I 是没有的)字段可以得到Oracle 根据事务量(如果是文件不可扩展,则会考虑剩余空间)采样后的自动计算出最佳的retenton 时间。这样对于一个事务量分布不均匀的 数据库 来说, ,就会引发潜在的问题-- 在批处理的时候可能Undo 会用光, 而且这个状态将一直持续, 不会释放。
如何取消 10g 的 auto UNDO Retention Tuning ,有如下三种方法:
 
PS:Automatic Tuning of Undo_retention Causes Space Problems [ID 420525.1] : Automatic Tuning of Undo_retention Causes Space Problems

1.) Set the autoextend and maxsize attribute of each datafile in the undo ts so it is autoextensible and its maxsize is equal to its current size so the undo tablespace now has the autoextend attribute but does not autoend:
SQL> alter database datafile '<datafile_flename>'
autoextend on maxsize <current_size>;

With this setting, v$undostat.tuned_undoretention is not calculated based on a percentage of the undo tablespace size, instead v$undostat.tuned_undoretention is set to the maximum of (maxquerylen secs + 300) undo_retention specified in init.ora file.

2.) Set the following hidden parameter in init.ora file:
_smu_debug_mode=33554432

or

SQL> Alter system set "_smu_debug_mode" = 33554432;

With this setting, v$undostat.tuned_undoretention is not calculated based on a percentage of the fixed size undo tablespace, instead v$undostat.tuned_undoretention is set to the maximum of (maxquerylen secs + 300) undo_retention specified in init.ora file.

3.) Set the following hidden parameter in init.ora:
_undo_autotune = false

or

SQL> Alter system set "_undo_autotune" = false; 可动态调整无需重启数据库。
Autotune of undo retention is turned off.
Wed Jan 30 20:59:26 GMT+08:00 2013ALTER SYSTEM SET _undo_autotune=FALSE SCOPE=BOTH;
SQL> show parameter undo
 
NAME                TYPE              VALUE
------------------- ----------------- ----------
_undo_autotune      boolean          FALSE
undo_management    string            AUTO
undo_retention      integer          900
undo_tablespace    string            UNDOTBS1
在设定完_undo_autotune后,并且结果应用方跑存储过程,未发现ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'错误(此错误并没有在alert日志中体现。)

猜你喜欢

转载自www.linuxidc.com/Linux/2016-08/134488.htm