00600[2662] 解决方法

1)Oracle数据库版本:11.2.0.4;

2)未开启归档;

3)没有备份:无RMAN备份、无DUMP备份;

4)数据库redo log 日志组,每组只有一个成员;

2、问题出现原因

因公司断电,导致生产数据库宕机,开启后,出现ORA-00600[2662]问题:ORA-00600: internal error code, arguments: [2662], [2], [1424107441], [2], [1424142235], [8388617], [], []。

通过查看数据库状态,只能开启到mount状态,并且有一个日志组文件损坏,而且损坏的是current redo log,并且这个组中,只有这一个日志组成员。

ORA-00600[2662]原因如下:

1)A data block SCN is ahead of the current SCN.(SCN不一致)

2)Bug 14351566  ORA-600 [kclchkblk_4] ORA-600 [2662] when doing flash back;

3、SCN简介

SCN即系统改变号(System Change Number),是在某个时间点定义数据库已提交版本的时间戳标记。 Oracle为每个已提交的事务分配一个唯一的SCN。 SCN的值是对数据库进行更改的逻辑时间点。 Oracle使用此编号记录对数据库所做的更改。在数据库中,SCN也可以说是无处不在,数据文件头,控制文件,数据块头,日志文件等等都标记着SCN。也正是这样,数据库的一致性维护和SCN密切相关。不管是数据的备份,恢复都是离不开SCN的。

回到顶部

二、问题处理思路

排除了因为Bug导致ORA-00600[2662]的错误,那么错误就定位在SCN不一致上面。

因为没有可用的日志、备份、归档等条件,只能采用重建控制文件,并通过设置Oracle内部隐含参数_allow_resetlogs_corruption=TRUE跳过一致性检查,强制open数据库。

回到顶部

三、解决步骤

1、参数文件中加入_allow_resetlogs_corruption=TRUE

alter system set _allow_resetlogs_corruption=TRUE scope=spfile;

注意:

即便加上此参数,数据库在此时开启,仍然会爆出ORA-00600[2662];

如果之前在无法open数据库的时候,加上此参数,仍然会爆出ORA-00600[2662]。

2、重建控制文件

CREATE CONTROLFILE REUSE DATABASE "TRSDB" RESETLOGS  NOARCHIVELOG  --注意:因为数据库本身就是非归档模式,所以也以非归档模式重建,在追加完SCN后,open数据库,直接open就可。
--  SET STANDBY TO MAXIMIZE PERFORMANCE
    MAXLOGFILES 5
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 1
    MAXLOGHISTORY 226
LOGFILE
  GROUP 1 '/home/oracle/app/oracle/oradata/trsdb/redo01.log'  SIZE 50M,  ---等数据库恢复后,需要在日志组中在加上一个日志组成员(一个日志组至少两个成员)
  GROUP 2 '/home/oracle/app/oracle/oradata/trsdb/redo02.log'  SIZE 50M,
  GROUP 3 '/home/oracle/app/oracle/oradata/trsdb/redo03.log'  SIZE 50M
-- STANDBY LOGFILE
DATAFILE
  '/home/oracle/app/oracle/oradata/trsdb/system01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sysaux01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb12_2.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/users01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/bigdb.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb03.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb04.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb05.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb06.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb07.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb08.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb09.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb10.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb11.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb12.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device03.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device04.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device05.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device06.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device07.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device08.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device09.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device10.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device11.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device12.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/bigdb-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb08-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb09-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb10-1.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb07-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb06-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb05-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device11_2.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device11_3.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device11_4.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device11_5.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb12_1.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb01a.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb01b.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb021.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb02-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb07-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb10-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb03-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb06-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb11-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb09-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb04-03.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb05-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb02-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/bigdb-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/bigdb-03.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/bigdb-04.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb01c.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb03-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb04-02.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB07_2018060817_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB08_2018061109_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB09_2018061917_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB10_2018062618_3.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB12_2018071420_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB02_2018072309_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB01_2018072409_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB01_2018072409_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE01_2018072409_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE02_2018072409_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE03_2018072717_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB06_2018072717_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE08_2018072717_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE09_2018072717_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB05_2018072717_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/SGDB03_2018072718_1.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE06_2018072718_2.dbf',
  '/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/DEVICE07_2018072718_2.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/device04-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb04-01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb09-03.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/sgdb08-02.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/audit01.dbf',
  '/home/oracle/app/oracle/oradata/trsdb/undotbs02.dbf'
;

3、使用oradebug poke推进SCN

1)oradebug setmypid
2)oradebug dumpvar sga kcsgscn_
3)oradebug poke 0x060012658 8 10014077592
4)oradebug dumpvar sga kcsgscn_
5)alter database open;

至此数据库恢复完毕,后面还需要将数据导出,并重建这个非常规恢复的数据库。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/0a21afc4f92a445403803f8308fdc37e.html