現場情況:
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