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導出操作,保障數據不丟失。

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