欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Oracle创建新undo表空间最佳实践(包含段检查)

程序员文章站 2023-12-13 20:15:58
在处理一则ora-600 [4194]案例时,参考mos文档:step by step to resolve ora-600 4194 4193 4197 on datab...

在处理一则ora-600 [4194]案例时,参考mos文档:step by step to resolve ora-600 4194 4193 4197 on database crash (文档 id 1428786.1)

1.对于ora 600[4194]的解释

2.创建新undo表空间最佳实践(包含段检查)

1.对于ora 600[4194]的解释:

the following error is occurring in the alert.log right before the database crashes.
ora-00600: internal error code, arguments: [4194], [#], [#], [], [], [], [], []
this error indicates that a mismatch has been detected between redo records and rollback (undo) records.
arguments:
arg [a] - maximum undo record number in undo block
arg [b] - undo record number from redo block
since we are adding a new undo record to our undo block, we would expect that the new record number is equal to the maximum record number in the undo block plus one. before oracle can add a new undo record to the undo block it validates that this is correct. if this validation fails, then an ora-600 [4194] will be triggered.

可以看到,此错误是因为redo和undo的记录不匹配。常见于异常断电等场景。

2.创建新undo表空间最佳实践(包含段检查)

best practice to create a new undo tablespace.
his method includes segment check.
 create pfile from spfile to edit
sql> create pfile='/tmp/initsid.ora' from spfile;
 shutdown the instance
 set the following parameters in the pfile /tmp/initsid.ora
 undo_management = manual
 event = '10513 trace name context forever, level 2'
 sql>>startup restrict pfile='/tmp/initsid.ora'
 sql>select tablespace_name, status, segment_name from dba_rollback_segs where status != 'offline';
this is critical - we are looking for all undo segments to be offline - system will always be online.
if any are 'partly available' or 'needs recovery' - please open an issue with oracle support or update the current sr. there are many options from this moment and oracle support analyst can offer different solutions for the bad undo segments.
if all offline then continue to the next step
 create new undo tablespace - example
sql>create undo tablespace <new undo tablespace> datafile <datafile> size 2000m;
 drop old undo tablespace
sql>drop tablespace <old undo tablespace> including contents and datafiles;
 sql>shutdown immediate;
sql>startup nomount; --> using your original spfile
. modify the spfile with the new undo tablespace name
sql> alter system set undo_tablespace = '<new tablespace created in step 6>' scope=spfile;
. sql>shutdown immediate;
. sql>startup; --> using spfile

总结

以上所述是小编给大家介绍的oracle创建新undo表空间最佳实践(包含段检查),希望对大家有所帮助

上一篇:

下一篇: