一、數據庫啟動報ORA-00600[2662]
[oracle@node1 ora11g]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 22 14:37:00 2011Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SQL> startup
ORACLE instance started.Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 1493174472 bytes
Database Buffers 637534208 bytes
Redo Buffers 4947968 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [2], [2147510731], [2],
[2164287937], [4194432], [], [], [], [], [], []
Process ID: 16829
Session ID: 96 Serial number: 3
二.alert日志錯誤顯示
Thu Dec 22 14:37:09 2011
ALTER DATABASE OPEN
LGWR: STARTING ARCH PROCESSES
Thu Dec 22 14:37:09 2011
ARC0 started with pid=20, OS id=16831
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Thu Dec 22 14:37:10 2011
ARC1 started with pid=21, OS id=16833
Thu Dec 22 14:37:10 2011
ARC2 started with pid=22, OS id=16835
Thu Dec 22 14:37:10 2011
ARC3 started with pid=23, OS id=16837
ARC1: Archival started
ARC2: Archival started
ARC2: Becoming the 'no FAL' ARCH
ARC2: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Thread 1 opened at log sequence 17Current log# 2 seq# 17 mem# 0: /opt/oracle/oradata/ora11g/redo02.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
SMON: enabling cache recovery
Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_16829.trc (incident=36156):
ORA-00600: internal error code, arguments: [2662], [2], [2147510731], [2], [2164287937], [4194432], [], [], [], [], [], []
Incident details in: /opt/oracle/diag/rdbms/ora11g/ora11g/incident/incdir_36156/ora11g_ora_16829_i36156.trc
ARC3: Archival started
ARC0: STARTING ARCH PROCESSES COMPLETE
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_16829.trc (incident=36157):
ORA-00600: internal error code, arguments: [2662], [2], [2147510731], [2], [2164287937], [4194432], [], [], [], [], [], []
Incident details in: /opt/oracle/diag/rdbms/ora11g/ora11g/incident/incdir_36157/ora11g_ora_16829_i36157.trc
Dumping diagnostic data in directory=[cdmp_20111222143713], requested by (instance=1, osid=16829), summary=[incident=36156].
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Undo initialization errored: err:600 serial:0 start:176607884 end:176611234 diff:3350 (33 seconds)
Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_16829.trc:
ORA-00600: internal error code, arguments: [2662], [2], [2147510731], [2], [2164287937], [4194432], [], [], [], [], [], []
Errors in file /opt/oracle/diag/rdbms/ora11g/ora11g/trace/ora11g_ora_16829.trc:
ORA-00600: internal error code, arguments: [2662], [2], [2147510731], [2], [2164287937], [4194432], [], [], [], [], [], []
Error 600 happened during db open, shutting down database
USER (ospid: 16829): terminating the instance due to error 600
Instance terminated by USER, pid = 16829
ORA-1092 signalled during: ALTER DATABASE OPEN...
opiodr aborting process unknown ospid (16829) as a result of ORA-1092
Thu Dec 22 14:37:15 2011
ORA-1092 : opitsk aborting process
三.分析日志
ORA-00600[2662]主要參數說明見:ORA-00600 [2662]
這里補充說明:e表示出現異常問題的數據塊的DBA,這里的4194432就是一個數據塊的DBA
–通過DBA地址查詢數據塊和文件號
SQL> select dbms_utility.data_block_address_block(4194432) "blick",2 dbms_utility.data_block_address_file(4194432) "file" from dual;blick file---------- ----------128 1
–當前數據庫SCN
SQL> select to_char(2147510731,'xxxxxxxxxxx') from dual;TO_CHAR(2147
------------800069cb
–當前數據塊SCN
SQL> select to_char(2164287937,'xxxxxxxxxxx') from dual;TO_CHAR(2164
------------810069c1
四.bbed查看相關SCN
[oracle@node1 ora11g]$ bbed
Password:
BBED-00113: Invalid password. Please rerun utility with the correct password.[oracle@node1 ora11g]$ bbed
Password: BBED: Release 2.0.0.0.0 - Limited Production on Thu Dec 22 14:49:24 2011Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.************* !!! For Oracle Internal Use only !!! ***************BBED> set filename "/opt/oracle/oradata/ora11g/system01.dbf"FILENAME /opt/oracle/oradata/ora11g/system01.dbfBBED> set block 1BLOCK# 1BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484 struct kcvcpscn, 8 bytes @484 ub4 kscnbas @484 0x800069c8ub2 kscnwrp @488 0x0002ub4 kcvcptim @492 0x2dedee96ub2 kcvcpthr @496 0x0001union u, 12 bytes @500 struct kcvcprba, 12 bytes @500 ub4 kcrbaseq @500 0x00000011ub4 kcrbabno @504 0x0000210fub2 kcrbabof @508 0x0010ub1 kcvcpetb[0] @512 0x02ub1 kcvcpetb[1] @513 0x00ub1 kcvcpetb[2] @514 0x00ub1 kcvcpetb[3] @515 0x00ub1 kcvcpetb[4] @516 0x00ub1 kcvcpetb[5] @517 0x00ub1 kcvcpetb[6] @518 0x00ub1 kcvcpetb[7] @519 0x00BBED> set block 128BLOCK# 128BBED> p bas_kcbh
ub4 bas_kcbh @8 0x810069c1BBED> p wrp_kcbh
ub2 wrp_kcbh @12 0x0002
這里看到的SCN(16進制)和我們在alert日志中看到的有一定的出入原因是在數據庫啟動的時候,當前SCN增加了,但是因為數據庫直接abort,沒有寫入到數據文件中。導致數據文件頭部的SCN比alert中顯示的稍微小一點(還有可能,系統當前的scn比system01.dbf的scn大一點)。通過對比數據塊和數據文件頭部的SCN也可以說明當數據塊的SCN>數據塊當前SCN導致ORA-00600[2662]
五.bbed修改數據塊的SCN
BBED> set offset 8OFFSET 8BBED> m /x c8690080
BBED-00215: editing not allowed in BROWSE modeBBED> set mode editMODE EditBBED> m /x c8690080
BBED-00209: invalid number (c8690080)BBED> m /x c869
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) yFile: /opt/oracle/oradata/ora11g/system01.dbf (0)Block: 128 Offsets: 8 to 519 Dba:0x00000000
------------------------------------------------------------------------c8690081 02000104 2f8f0000 00000000 00000000 00000000 00000000 06000000 2f000000 20100000 00000000 00000000 07000000 81004000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 06000000 00000000 00000000 00000040 81004000 07000000 88004000 08000000 10024000 08000000 18024000 08000000 20024000 08000000 28024000 08000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line>BBED> set offset +2OFFSET 10BBED> m /x 0080File: /opt/oracle/oradata/ora11g/system01.dbf (0)Block: 128 Offsets: 10 to 521 Dba:0x00000000
------------------------------------------------------------------------00800200 01042f8f 00000000 00000000 00000000 00000000 00000600 00002f00 00002010 00000000 00000000 00000700 00008100 40000000 00000000 00000000 00000000 00000000 00000000 00000000 00000600 00000000 00000000 00000000 00408100 40000700 00008800 40000800 00001002 40000800 00001802 40000800 00002002 40000800 00002802 40000800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <32 bytes per line>BBED> p tailchk
ub4 tailchk @8188 0x69c10e01BBED> set offset 8188OFFSET 8188BBED> m /x 010ec869File: /opt/oracle/oradata/ora11g/system01.dbf (0)Block: 128 Offsets: 8188 to 8191 Dba:0x00000000
------------------------------------------------------------------------010ec869 <32 bytes per line>BBED> p tailchk
ub4 tailchk @8188 0x69c80e01BBED> p bas_kcbh
ub4 bas_kcbh @8 0x800069c8BBED> sum apply
Check value for File 0, Block 128:
current = 0x8e2f, required = 0x8e2fBBED> exit
六.啟動數據庫
[oracle@node1 ora11g]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 22 14:58:10 2011Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SQL> startup
ORACLE instance started.Total System Global Area 2137886720 bytes
Fixed Size 2230072 bytes
Variable Size 1493174472 bytes
Database Buffers 637534208 bytes
Redo Buffers 4947968 bytes
Database mounted.
Database opened.
七.補充說明
一般遇到ORA-00600[2662]都是使用alter session set events ’10015 trace name adjust_scn level N’;方法處理,但是有時候會遇到ORA-01031錯誤,那就需要請bbed幫忙處理
OS Pid: 30268 executed alter session set events '10051 trace name adjust_scn level 2'
Thu Dec 22 12:04:07 2011
Errors in file /ora101/diag/rdbms/ora11/ora11/trace/ora11_ora_30268.trc:
ORA-01031: insufficient privileges
Thu Dec 22 12:04:43 2011
Errors in file /ora101/diag/rdbms/ora11/ora11/trace/ora11_ora_846.trc:
ORA-01031: insufficient privileges