1.1 ORA-600 [4193] WhenTrying To Open The Database [ID 763566.1]
Symptoms
Copying databasefrom one server to another server and getting an ORA-600 [4193] error whentrying to open the database on the destination server.
--copy 数据库从一个server 到另一个server 后,尝试打开时报这个错误。
Cause
The online redologs were copied when the source database was open,online redo logsshould never be copied when the database is open.
--导致原因是因为在数据库open时把online redo logs 也一起copy 过去了。 在数据库open状态,online redo log 不应该copy。
Solution
In this instancethe datafiles were being copied properly after the tablespaces were put in tobackup mode, however, online redo logs should only be copied if the sourcedatabase is shutdown first before copying the online redo logs. Thesource database needed to remain open so, the datafiles were copied again (withthe tablespaces in backup mode) and then a number of archivelogs weretransferred over to the new server and after the last archivelog was appliedthe database could be opened with resetlogs and new online redo logs werecreated on the destination server.
--当表空间被设置为backup 模式之后,可以copy 数据文件,但是onlineredo log 只能是在数据库shutdown 之后才能copy,如果数据库一直是open 状态,那么只能把datafile copy 过去,然后把归档文件传送过去,最后用openresetlogs的方式打开数据库,在open时online redo log 会自动重建。
1.2 Ora-600 [4193] WhenOpening Or Shutting Down A Database [ID 452662.1]
1.2.1 Symptoms
Errors in alert.log:
TueJul1713:38:132007
Errorsinfile/home/oracle/oracle/product/10.2.0/yms/rdbms/log/yms_smon_8337.trc:
ORA-00607:Internalerroroccurredwhilemakingachangetoadatablock
ORA-00600:internalerrorcode,arguments:[4193],[3552],[3554],[],[],[]
1.2.2 Cause
When we try toapply redo to an undo block (forward changes are made by the applicationof redo to a block) we check that the seq# in the undo record matches theseq# in the redo record.
--数据库在启动时需要进行一个前滚的操作,在前滚时会应用redo 到undo block上,操作时会检查undorecord里的seq#和 redo record里的seq#.
These seq#should be the same because when we apply a redo record we must apply itto thecorrect version of the block.
--正常情况下,这2者的seq# 应该是一致的。
We can onlyapply a redo record to a block that contains the same seq# as in the redorecord.
--在一致的情况下,我们才应用redo record 到undo record。
If the seq# do not match then ORA-600[4193][a]. is raised. .
Arg [a] Undorecord seq number --> seq: 0xde0 = 3552
Arg Redo record seq number --> seq:0x0de2 = 3554
--如果不一致就会出现ORA-600[4193][a]的错误。其中a 是undo 里的seq#记录,b是redo 里的seq# 值。 这里的值都是十六进程,我们可以通过to_number() 这个函数来转换一下:
SYS@anqing1(rac1)> Select to_number('de0','xxxx') from dual;
TO_NUMBER('DE0','XXXX')
-----------------------
3552
This implies some kind of block corruptionin either the redo or the undo block.
--当redo record 和 undo record 不一致时,就会抛出ORA-600[4193]的错误。
1.2.3 Solution
1.2.3.1 If Database is opened:
--在db open 状态下,解决的方法如下:
1) Find out the rollback segment, based onthe first part of the xid: 0x0002.045.00006c61
usn=2 is the segment_id
selectsegment_name,status from dba_rollback_segs where segment_id=2;
RS_DATA1ONLINE
2) Dump the transaction table of the rollbacksegment to see if all TX are commited:
alter system dump undoheader RS_DATA1;
3) check the trace file created underuser_dump_dest
In the trace filesearch for the Keyword "TRN TBL"
TRNTBL::
indexstatecflagswrap# uelscndba
-----------------------------------------------------------------------------
0x00 9 0x000x21eb10x00230x0000.d28c43e90x00000000......
state=9 means transaction is committed
4) offline the rollback segment:
alter rollbacksegment rs_data1 offline;
select status from dba_rollback_segs wheresegment_id=2;
5) if STATUS=OFFLINE
droprollback segment RS_DATA1;
1.2.3.2 If Database doesn't open:
--如果数据库不是open状态,处理方法如下:
1. a) If using rollbacksegments, remove the rollback_segments line from init.ora, and open database
b) If usingundo segments set undo_management = manual in init.ora/spfile, and try to opendatabase.
2. If database opens means all transactionsare committed, and you can drop the rollback segment or the undo tablespace
Undo corruptionmay be caused after a shrink and the same undo block may be used for two different transactions causing several internal errors like:
ORA-600 [4193] / ORA-600 [4194] for newtransactions
ORA-600 [4137] for a transaction rollback
Undo segment shrink is internally done by Oracle.
--undo shrink 导致的undo corruptions