본문 바로가기
스터디북

[10/15] system.dbf for corruption

by 파이어볼러 2015. 10. 15.
alert log 내용
-------------------------------------------------------------------------------------------
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/system01.dbf' for corruption   at rdba: 0x00400001 (file 1, block 1)
Reread (file 1, block 1) found same corrupt data
-------------------------------------------------------------------------------------------

처음 DB를 시작하기 전에 alert log를 확인해보니 이런 에러가 있었다 

DB를 시작해서 보니 역시 alert에서 본 error가 발생했고 critical error기 때문에 mount 단계에서 작업해야 한다

SYS@orcl>SYS@orcl>ORACLE instance started.

Total System Global Area 1707446272 bytes
Fixed Size                  1336988 bytes
Variable Size            1006635364 bytes
Database Buffers          687865856 bytes
Redo Buffers               11608064 bytes
Database mounted.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-01210: data file header is media corrupt

(file 1, block 1) 이걸 보고 block corruption이니 block 단위로 recover를 시도했으나

RMAN> recover datafile 1 block 1;

Starting recover at 2015-10-15:06:14:37
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=135 device type=DISK
searching flashback logs for block images until SCN 1234912
finished flashback log search, restored 0 blocks

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 2015-10-15:06:14:38

RMAN> alter database open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 10/15/2015 06:15:37
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-01210: data file header is media corrupt

같은 에러가 반복이 됬고 그래서 그냥 system.dbf를 통째로 restore했다.

RMAN> restore datafile 1;

Starting restore at 2015-10-15:06:15:56
using channel ORA_DISK_1
using channel ORA_DISK_2

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_1
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_1 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_2
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_2 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 2
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_3
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_3 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 3
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_4
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_4 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 4
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_5
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_5 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 5
channel ORA_DISK_1: reading from backup piece /BACKUP/rman/ORCL_198_6
channel ORA_DISK_1: piece handle=/BACKUP/rman/ORCL_198_6 tag=TAG20151014T164118
channel ORA_DISK_1: restored backup piece 6
channel ORA_DISK_1: restore complete, elapsed time: 00:00:23
Finished restore at 2015-10-15:06:16:19

그리고 recover 했고

RMAN> recover datafile 1;

Starting recover at 2015-10-15:06:16:42
using channel ORA_DISK_1
using channel ORA_DISK_2

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 2015-10-15:06:16:43

DB가 Open 됬다.

RMAN> alter database open;

database opened

문제 발생 되고 mount 단계 이후 alert log
------------------------------------------------------------------------
Read of datafile '/u01/app/oracle/oradata/orcl/system01.dbf' (fno 1) header failed with ORA-01210
Hex dump of (file 1, block 1) in trace file /u01/app                          /oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5225.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during datafile header read
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Rereading datafile 1 header failed with ORA-01210
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/                          trace/orcl_ora_5225.trc:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/orc                          l/system01.dbf'
ORA-01210: data file header is media corrupt
ORA-1122 signalled during: ALTER DATABASE OPEN...
Thu Oct 15 06:12:57 2015
Checker run found 1 new persistent data failures
Thu Oct 15 06:14:38 2015
Hex dump of (file 1, block 1) in trace file /u01/app                          /oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, bloc                          k 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/syste                          m01.dbf' for corruption at rdba: 0x00400001 (file 1,                           block 1)
Reread (file 1, block 1) found same corrupt data
Hex dump of (file 1, block 1) in trace file /u01/app                          /oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, bloc                          k 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/syste                          m01.dbf' for corruption at rdba: 0x00400001 (file 1,                           block 1)
Reread (file 1, block 1) found same corrupt data
Hex dump of (file 1, block 1) in trace file /u01/app                          /oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, bloc                          k 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/syste                          m01.dbf' for corruption at rdba: 0x00400001 (file 1,                           block 1)
Reread (file 1, block 1) found same corrupt data
Thu Oct 15 06:14:38 2015
alter database recover datafile list clear
Completed: alter database recover datafile list clea                          r
Thu Oct 15 06:15:37 2015
alter database open
Read of datafile '/u01/app/oracle/oradata/orcl/system01.dbf' (fno 1) header failed with ORA-01210
Hex dump of (file 1, block 1) in trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during datafile header read
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Rereading datafile 1 header failed with ORA-01210
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-01210: data file header is media corrupt
ORA-1122 signalled during: alter database open...
Thu Oct 15 06:15:48 2015
Hex dump of (file 1, block 1) in trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/system01.dbf' for corruption at rdba: 0x00400001 (file 1, block 1)
Reread (file 1, block 1) found same corrupt data
Hex dump of (file 1, block 1) in trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/system01.dbf' for corruption at rdba: 0x00400001 (file 1, block 1)
Reread (file 1, block 1) found same corrupt data
Hex dump of (file 1, block 1) in trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/system01.dbf' for corruption at rdba: 0x00400001 (file 1, block 1)
Reread (file 1, block 1) found same corrupt data
Hex dump of (file 1, block 1) in trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc
Corrupt block relative dba: 0x00400001 (file 1, block 1)
Bad header found during kcvxfh v8
Data in bad block:
 type: 30 format: 2 rdba: 0x02c0000b
 last change scn: 0x0000.0012dd3a seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0xdd3a1e01
 check value in block header: 0x4272
 computed block checksum: 0x0
Reading datafile '/u01/app/oracle/oradata/orcl/system01.dbf' for corruption at rdba: 0x00400001 (file 1, block 1)
Reread (file 1, block 1) found same corrupt data
Thu Oct 15 06:16:16 2015
Full restore complete of datafile 1 /u01/app/oracle/oradata/orcl/system01.dbf.  Elapsed time: 0:00:17
  checkpoint is 1234912
  last deallocation scn is 1056617
  Undo Optimization current scn is 952547
Thu Oct 15 06:16:31 2015
alter database recover datafile list clear
Completed: alter database recover datafile list clear
Thu Oct 15 06:16:39 2015
alter database open
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_5288.trc:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'
ORA-1113 signalled during: alter database open...
Thu Oct 15 06:16:39 2015
Checker run found 1 new persistent data failures
alter database recover datafile list clear
Completed: alter database recover datafile list clear
alter database recover if needed
 datafile 1
Media Recovery Start
Serial Media Recovery started
Recovery of Online Redo Log: Thread 1 Group 1 Seq 4 Reading mem 0
  Mem# 0: /u01/app/oracle/oradata/orcl/redo01.log
  Mem# 1: /u01/app/oracle/oradata/orcl/redo01_b.log
Recovery of Online Redo Log: Thread 1 Group 2 Seq 5 Reading mem 0
  Mem# 0: /u01/app/oracle/oradata/orcl/redo02.log
  Mem# 1: /u01/app/oracle/oradata/orcl/redo02_b.log
Recovery of Online Redo Log: Thread 1 Group 3 Seq 6 Reading mem 0
  Mem# 0: /u01/app/oracle/oradata/orcl/redo03.log
  Mem# 1: /u01/app/oracle/oradata/orcl/redo03_b.log
Media Recovery Complete (orcl)
Completed: alter database recover if needed
 datafile 1


'스터디북' 카테고리의 다른 글

[10/15] 실습 - 1 list_advise_repair failure  (0) 2015.10.15
[10/15] 정리  (0) 2015.10.15
[10/14] 실습 - 4 block corruption recover  (0) 2015.10.14
[10/14] 실습 - 3 FBDA  (0) 2015.10.14
[10/14] 실습 - 2 flashback database  (0) 2015.10.14