Oracle【ORA-00600 internal error code arguments [2662]】恢复一例

背景

  • 1.数据库版本:11.2.0.4
  • 2.未开启归档
  • 3.没有备份:无RMAN备份、无DUMP备份
  • 4.数据库redo log全部删除。

解决思路:

Oracle 的隐含参数:
_allow_resetlogs_corruption=TRUE
SYS>alter system set "_allow_resetlogs_corruption"=true scope=spfile;
数据库关闭数据库,在启动
SQL> shutdown immediate;
SQL> startup

出现如下错误:

ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [1030200641], [0],
[1030304018], [12583040], [], [], [], [], [], []
Process ID: 31791
Session ID: 694 Serial number: 5

问题的原因解释:数据库损坏之后,使用_allow_resetlogs_corruption 不一定能打开。也会出现如上的问题。其中[2662]代表的意思如下:ORA-600 [2662]"Block sCN is ahead of Current SCN

说明当前数据库的数据块保存的SCN大于当前的SCN,因为Current SCN会和dependent SCN进行比比较。如果[Current SCN] <[dependent SCN],那么数据库就会产生这个ORA-600[2662]的错误了。这个错误一共有五个参数,分别代表不同的含义,

  • ORA-600 [2662] [a] [b] [c] [d] [e]
  • Arg [a] Current SCN WRAP
  • Arg [b]Current SCN BASE
  • Arg [c] dependent SCN WRAP
  • Arg [d] dependent SCN BASE(数据库块的SCN)

我这边故障的数据库。当前的SCN为[1030200641],而数据库依赖的dependent SCN为[1030304018]。
所以,数据库需要不断推进SCN号,才能正常启动。

实战操作的思路

由于数据库,不断的重启,会不断推进SCN号,直到大于依赖的SCN号。如下:

第一次启动

SCN号为[1030220646],SCN号往前走了20000多。

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2217952 bytes
Variable Size             671090720 bytes
Database Buffers          155189248 bytes
Redo Buffers                6606848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [1030220646], [0],
[1030304018], [12583040], [], [], [], [], [], []
Process ID: 32058
Session ID: 694 Serial number: 5

第二次启动

SCN号为[1030240651],SCN号往前走了20000多。

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2217952 bytes
Variable Size             671090720 bytes
Database Buffers          155189248 bytes
Redo Buffers                6606848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [1030240651], [0],
[1030304018], [12583040], [], [], [], [], [], []
Process ID: 32271
Session ID: 694 Serial number: 5

第三次启动

SCN号为[1030260656],SCN号往前走了20000多

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2217952 bytes
Variable Size             671090720 bytes
Database Buffers          155189248 bytes
Redo Buffers                6606848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [1030260656], [0],
[1030304018], [12583040], [], [], [], [], [], []
Process ID: 32460
Session ID: 694 Serial number: 5

第N次启动

如此反复,不断推进。然后SCN号最终推进到[1030300665],和[1030304018]只相差了4000多。说明最后一次启动,SCN再推进20000,数据库应该能打开,

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2217952 bytes
Variable Size             671090720 bytes
Database Buffers          155189248 bytes
Redo Buffers                6606848 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2663], [0], [1030300665], [0],
[1030304018], [], [], [], [], [], [], []
Process ID: 450
Session ID: 694 Serial number: 5

最后一次启动

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size                  2217952 bytes
Variable Size             671090720 bytes
Database Buffers          155189248 bytes
Redo Buffers                6606848 bytes
Database mounted.
Database opened.

数据库正常启动,立马做出expdp导出操作,保障数据不丢失。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章