ORA-00600 [2662]错误解决

sbtmbj00 2013-06-26

客户报修,客户端软件无法连接服务器,查看数据库日志信息发下如下错误信息:

Tue Jun 25 12:02:52 CST 2013

Errors in file /home/Oracle/orabase/admin/ORACLE/bdump/oracle_q000_3529.trc:

ORA-00600: internal error code, arguments: [2662], [0], [91108808], [0], [91133612], [12605758], [], []

Tue Jun 25 12:02:55 CST 2013

Errors in file /home/oracle/orabase/admin/ORACLE/bdump/oracle_q000_3529.trc:

ORA-00600: internal error code, arguments: [2662], [0], [91108810], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108808], [0], [91133612], [12605758], [], []

Tue Jun 25 12:02:56 CST 2013

Errors in file /home/oracle/orabase/admin/ORACLE/bdump/oracle_q000_3529.trc:

ORA-00600: internal error code, arguments: [2662], [0], [91108811], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108810], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108808], [0], [91133612], [12605758], [], []

Tue Jun 25 12:02:57 CST 2013

Errors in file /home/oracle/orabase/admin/ORACLE/bdump/oracle_q000_3529.trc:

ORA-00600: internal error code, arguments: [2662], [0], [91108812], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108811], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108810], [0], [91133612], [12605758], [], []

ORA-00600: internal error code, arguments: [2662], [0], [91108808], [0], [91133612], [12605758], [], []


根据网络资料获取到如下信息:

ORA-600 [2662] "Block SCN is ahead of Current SCN",说明当前数据库的数据块的SCN早于当前的SCN,主要是和存储在UGA变量中的dependent SCN进行比较,如果当前的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

Arg [e] Where present this is the DBA where the dependent SCN came from.

通过查阅文档,发现这个错误的产生原因主要有以下几条:

1.使用隐含参数_ALLOW_RESETLOGS_CORRUPTION后resetlogs打开数据库

2.硬件错误引起数据库没法写控制文件和重做日志文件

3.错误的部分恢复数据库

4.恢复了控制文件但是没有使用recover database using backup controlfile进行恢复

5.数据库crash后设置了_DISABLE_LOGGING隐含参数

6.在并行服务器环境中DLM存在问题

根据错误中的提示,它的参数b=91108811,d=91133612,表明当前的SCN确实是小于dependent SCN,所以产生了这个600的错误。于是使用ADJUST_SCN事件来调整当前的SCN,使其大于dependent SCN,然后保证数据库可以全库的导出,然后重建数据库导入数据。调整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已经足够。也可以根据实际情况适当调整。


经询问当班负责人,怀疑为硬件错误引起数据库没法写控制文件和重做日志文件,于是执行如下操作进行恢复打开:

SQL> startup mount

ORACLE instance started.

Total System Global Area  97588504 bytes

Fixed Size                  451864 bytes

Variable Size              33554432 bytes

Database Buffers          62914560 bytes

Redo Buffers                667648 bytes

Database mounted.

SQL> alter session set events '10015 trace name adjust_scn level 1';

Session altered.

SQL> alter database open;

Database altered.

SQL>


然后分别业务账户登录数据库库导出业务数据,重建新库导入业务数据恢复业务。

相关推荐