现场情况:
1、数据库没有作归档,
2、数据都存放在system表空间
3、没有备份
状况:
操作系统由于磁盘原因出现宕机,用户强行按电源关闭系统,数据库无法启动。
处理:
Sql代码
- SQL> recover database;
- ORA-00283: recovery session canceled due to errors
- ORA-12801: error signaled in parallel query server P002
- ORA-10562: Error occurred while applying redo to data block (file# 1, block#4568)
- ORA-10564: tablespace SYSTEM
- ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
- ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 576
- ORA-00600: internal error code, arguments: [6101]
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-12801: error signaled in parallel query server P002
ORA-10562: Error occurred while applying redo to data block (file# 1, block#4568)
ORA-10564: tablespace SYSTEM
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 576
ORA-00600: internal error code, arguments: [6101]
检查日志信息如下:
Oracle代码
- Mon Nov 19 15:38:50 2007
- ALTER DATABASE RECOVER database
- Mon Nov 19 15:38:50 2007
- Media Recovery Start
- parallel recovery started with 3 processes
- Mon Nov 19 15:38:50 2007
- Recovery of Online Redo Log: Thread 1 Group 3 Seq 16 Reading mem 0
- Mem# 0 errs 0: /opt/oracle/oradata/orcl/redo03.log
- Mon Nov 19 15:38:50 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p002_7917.trc:
- ORA-00600: internal error code, arguments: [6101], [0], [17], [0], [], [], [], []
- Mon Nov 19 15:38:50 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p000_7913.trc:
- ORA-00600: internal error code, arguments: [3020], [2], [882], [8389490], [], [], [], []
- ORA-10567: Redo is inconsistent with data block (file# 2, block# 882)
- ORA-10564: tablespace UNDOTBS1
- ORA-01110: data file 2: '/opt/oracle/oradata/orcl/undotbs01.dbf'
- ORA-10560: block type 'KTU UNDO BLOCK'
- Mon Nov 19 15:38:51 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p000_7913.trc:
- ORA-00600: internal error code, arguments: [3020], [2], [882], [8389490], [], [], [], []
- ORA-10567: Redo is inconsistent with data block (file# 2, block# 882)
- ORA-10564: tablespace UNDOTBS1
- ORA-01110: data file 2: '/opt/oracle/oradata/orcl/undotbs01.dbf'
- ORA-10560: block type 'KTU UNDO BLOCK'
- Mon Nov 19 15:38:51 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p002_7917.trc:
- ORA-10562: Error occurred while applying redo to data block (file# 1, block# 4568)
- ORA-10564: tablespace SYSTEM
- ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
- ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 576
- ORA-00600: internal error code, arguments: [6101], [0], [17], [0], [], [], [], []
- Mon Nov 19 15:38:54 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p001_7915.trc:
- ORA-00600: internal error code, arguments: [kddummy_blkchk], [1], [1658], [6101], [], [], [], []
- Mon Nov 19 15:38:54 2007
- Errors in file /opt/oracle/admin/orcl/bdump/orcl_p001_7915.trc:
- ORA-10562: Error occurred while applying redo to data block (file# 1, block# 1658)
- ORA-10564: tablespace SYSTEM
- ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
- ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 237
- ORA-00607: Internal error occurred while making a change to a data block
- ORA-00600: internal error code, arguments: [kddummy_blkchk], [1], [1658], [6101], [], [], [], []
- Mon Nov 19 15:38:54 2007
- Media Recovery failed with error 12801
- ORA-283 signalled during: ALTER DATABASE RECOVER database ...
Mon Nov 19 15:38:50 2007
ALTER DATABASE RECOVER database
Mon Nov 19 15:38:50 2007
Media Recovery Start
parallel recovery started with 3 processes
Mon Nov 19 15:38:50 2007
Recovery of Online Redo Log: Thread 1 Group 3 Seq 16 Reading mem 0
Mem# 0 errs 0: /opt/oracle/oradata/orcl/redo03.log
Mon Nov 19 15:38:50 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p002_7917.trc:
ORA-00600: internal error code, arguments: [6101], [0], [17], [0], [], [], [], []
Mon Nov 19 15:38:50 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p000_7913.trc:
ORA-00600: internal error code, arguments: [3020], [2], [882], [8389490], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 2, block# 882)
ORA-10564: tablespace UNDOTBS1
ORA-01110: data file 2: '/opt/oracle/oradata/orcl/undotbs01.dbf'
ORA-10560: block type 'KTU UNDO BLOCK'
Mon Nov 19 15:38:51 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p000_7913.trc:
ORA-00600: internal error code, arguments: [3020], [2], [882], [8389490], [], [], [], []
ORA-10567: Redo is inconsistent with data block (file# 2, block# 882)
ORA-10564: tablespace UNDOTBS1
ORA-01110: data file 2: '/opt/oracle/oradata/orcl/undotbs01.dbf'
ORA-10560: block type 'KTU UNDO BLOCK'
Mon Nov 19 15:38:51 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p002_7917.trc:
ORA-10562: Error occurred while applying redo to data block (file# 1, block# 4568)
ORA-10564: tablespace SYSTEM
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
ORA-10561: block type 'TRANSACTION MANAGED INDEX BLOCK', data object# 576
ORA-00600: internal error code, arguments: [6101], [0], [17], [0], [], [], [], []
Mon Nov 19 15:38:54 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p001_7915.trc:
ORA-00600: internal error code, arguments: [kddummy_blkchk], [1], [1658], [6101], [], [], [], []
Mon Nov 19 15:38:54 2007
Errors in file /opt/oracle/admin/orcl/bdump/orcl_p001_7915.trc:
ORA-10562: Error occurred while applying redo to data block (file# 1, block# 1658)
ORA-10564: tablespace SYSTEM
ORA-01110: data file 1: '/opt/oracle/oradata/orcl/system01.dbf'
ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 237
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kddummy_blkchk], [1], [1658], [6101], [], [], [], []
Mon Nov 19 15:38:54 2007
Media Recovery failed with error 12801
ORA-283 signalled during: ALTER DATABASE RECOVER database ...
从上面信息中抓取了一个信息:
Oracle代码
- ORA-10562: Error occurred while applying redo to data block (file# 1, block# 1658)
ORA-10562: Error occurred while applying redo to data block (file# 1, block# 1658)
针对这个错误解决如下:
Oracle代码
- ORA-10562: Error occurred while applying redo to data block (file# string, block# string)
- Cause: See other errors on error stack.
- Action: Investigate why the error occurred and how important is the data block. Media and standby database recovery usually can continue if user allows recovery to corrupt this data block。
ORA-10562: Error occurred while applying redo to data block (file# string, block# string)
Cause: See other errors on error stack.
- SQL>startup mount
- SQL>recover database using backup controlfile until cancel;
- SQL>alter database open resetlogs;
- SQL> startup mount
- SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile;
- SQL>shutdown immediate
- SQL> startup mount
- SQL> alter database open resetlogs;
- SQL> startup
SQL>recover database using backup controlfile until cancel;
SQL>alter database open resetlogs;
SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile;
SQL> alter database open resetlogs;
- SQL>startup mount
- SQL>recover database using backup controlfile until cancel;
- Cancel
- SQL>alter database open resetlogs;
- #此时会提示system表空间需要恢复,但是由于当前日志损坏,无法进行恢复,所以需要加入#隐含参数,oracle才不会监测scn的一致性,才能打开数据库。
- #重启数据库加入隐含参数
- SQL> startup mount
- SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile;
- SQL> shutdown immediate
- SQL> startup mount
- SQL> alter database open resetlogs;
- alter database open resetlogs
- *
- ERROR at line 1:
- ORA-01092: ORACLE instance terminated. Disconnection forced
- #不管这些,再次登录sqlplus起动数据库
- SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 16 08:03:43 2007
- Copyright (c) 1982, 2005, Oracle. All rights reserved.
- Connected to:
- Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
- With the Partitioning, OLAP and Data Mining options
- SQL>startup
SQL>recover database using backup controlfile until cancel;
SQL>alter database open resetlogs;
#此时会提示system表空间需要恢复,但是由于当前日志损坏,无法进行恢复,所以需要加入#隐含参数,oracle才不会监测scn的一致性,才能打开数据库。
SQL> alter system set “_allow_resetlogs_corruption”=true scope=spfile;
SQL> alter database open resetlogs;
ORA-01092: ORACLE instance terminated. Disconnection forced
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 16 08:03:43 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production