| 導購 | 订阅 | 在线投稿
分享
 
 
 

SCN不一致將會導致ORA-00600 2662錯誤

來源:互聯網  2008-06-01 06:47:10  評論

在許多情況下,在使用隱含參數_ALLOW_RESETLOGS_CORRUPTION後,用resetlogs打開數據庫將會由于SCN不一致出現ORA-00600 2662錯誤,下文中將針對這一問題的解決過程進行詳細的介紹。

首先,在正常啓動數據庫後,大家可以從alert文件中發現ora-00600 2662號錯誤。

Sun Dec 11 18:02:25 2005Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []Sun Dec 11 18:02:27 2005Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []Sun Dec 11 18:02:27 2005Error 600 happened during db open, shutting down databaseUSER: terminating instance due to error 600

(可以通過Oracle的內部事件來調整SCN)

增進SCN的常用方法:

1.通過immediate trace name方式(在數據庫Open狀態下)

alter session set events 'IMMEDIATE trace name ADJUST_SCN level x';

2.通過10015事件(在數據庫無法打開,mount狀態下)

alter session set events '10015 trace name adjust_scn level x';

注釋:level 1爲增進SCN 10億 (1 billion) (1024*1024*1024),一般情況下Level 1已經夠用。大家也可以根據實際情況適當調整。

在此示例中由于數據庫無法打開,只能使用兩種方法。

[oracle@jumper dbs]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to an idle instance.SQL> startup mount pfile=initconner.oraORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.SQL> alter session set events '10015 trace name adjust_scn level 10';Session altered.SQL> alter database open;Database altered.

大家需要注意,由于示例中使用了10015事件,使得SCN增進了10 billion,稍後可以繼續來驗證。

[oracle@jumper dbs]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to an idle instance.SQL> startup mount pfile=initconner.oraORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.SQL> alter session set events '10015 trace name adjust_scn level 10';Session altered.SQL> alter database open;Database altered.

此時,數據庫可以打開,從alert文件中大家可以發現下面的提示:

Sun Dec 11 18:27:04 2005SMON: enabling cache recoverySun Dec 11 18:27:05 2005Debugging event used to advance scn to 10737418240

SCN被增進了10 billion,即 10 * (1024*1024*1024) = 10737418240,正好是日志裏記錄的數量。

大家可以從數據庫內部看一下檢查點的增進情況:

SQL> select open_mode from v$database;OPEN_MODE----------READ WRITESQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 547783998 2 547783998 3 547783998SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.Database opened.SQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 1.0737E+10 2 1.0737E+10 3 1.0737E+10SQL> col CHECKPOINT_CHANGE# for 99999999999999999SQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 10737418447 2 10737418447 3 10737418447

至此,大家可以發現CHECKPOINT_CHANGE#最後被增進了10 Billion。

在許多情況下,在使用隱含參數_ALLOW_RESETLOGS_CORRUPTION後,用resetlogs打開數據庫將會由于SCN不一致出現ORA-00600 2662錯誤,下文中將針對這一問題的解決過程進行詳細的介紹。 首先,在正常啓動數據庫後,大家可以從alert文件中發現ora-00600 2662號錯誤。 Sun Dec 11 18:02:25 2005Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []Sun Dec 11 18:02:27 2005Errors in file /opt/oracle/admin/conner/udump/conner_ora_13349.trc:ORA-00600: internal error code, arguments: [2662], [0], [547743994], [0], [898092653], [8388617], [], []Sun Dec 11 18:02:27 2005Error 600 happened during db open, shutting down databaseUSER: terminating instance due to error 600 (可以通過Oracle的內部事件來調整SCN) 增進SCN的常用方法: 1.通過immediate trace name方式(在數據庫Open狀態下) alter session set events 'IMMEDIATE trace name ADJUST_SCN level x'; 2.通過10015事件(在數據庫無法打開,mount狀態下) alter session set events '10015 trace name adjust_scn level x'; 注釋:level 1爲增進SCN 10億 (1 billion) (1024*1024*1024),一般情況下Level 1已經夠用。大家也可以根據實際情況適當調整。 在此示例中由于數據庫無法打開,只能使用兩種方法。 [oracle@jumper dbs]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to an idle instance.SQL> startup mount pfile=initconner.oraORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.SQL> alter session set events '10015 trace name adjust_scn level 10';Session altered.SQL> alter database open;Database altered. 大家需要注意,由于示例中使用了10015事件,使得SCN增進了10 billion,稍後可以繼續來驗證。 [oracle@jumper dbs]$ sqlplus "/ as sysdba"SQL*Plus: Release 9.2.0.4.0 - Production on Sun Dec 11 18:26:18 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to an idle instance.SQL> startup mount pfile=initconner.oraORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.SQL> alter session set events '10015 trace name adjust_scn level 10';Session altered.SQL> alter database open;Database altered. 此時,數據庫可以打開,從alert文件中大家可以發現下面的提示: Sun Dec 11 18:27:04 2005SMON: enabling cache recoverySun Dec 11 18:27:05 2005Debugging event used to advance scn to 10737418240 SCN被增進了10 billion,即 10 * (1024*1024*1024) = 10737418240,正好是日志裏記錄的數量。 大家可以從數據庫內部看一下檢查點的增進情況: SQL> select open_mode from v$database;OPEN_MODE----------READ WRITESQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 547783998 2 547783998 3 547783998SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 97588504 bytesFixed Size 451864 bytesVariable Size 33554432 bytesDatabase Buffers 62914560 bytesRedo Buffers 667648 bytesDatabase mounted.Database opened.SQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 1.0737E+10 2 1.0737E+10 3 1.0737E+10SQL> col CHECKPOINT_CHANGE# for 99999999999999999SQL> select file#,CHECKPOINT_CHANGE# from v$datafile; FILE# CHECKPOINT_CHANGE#---------- ------------------ 1 10737418447 2 10737418447 3 10737418447 至此,大家可以發現CHECKPOINT_CHANGE#最後被增進了10 Billion。
󰈣󰈤
王朝萬家燈火計劃
期待原創作者加盟
 
 
 
>>返回首頁<<
 
 
 
 
 熱帖排行
 
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有