dbf. found same corrupt data
Hex dump of (file 5, block 83) in trace file /u01/app/admin/ora10g/bdump/ora10g_smon_9224.trc
Corrupt block relative dba: 0x01400053 (file 5, block 83)
Bad header found during buffer read
Data in bad block:
type: 49 format: 1 rdba: 0x01400a31
last change scn: 0x0000.003ec523 seq: 0x1 flg: 0x04
spare1: 0x31 spare2: 0x31 spare3: 0x0
consistency value in tail: 0xc5232301
check value in block header: 0x638b
computed block checksum: 0xe841
Reread of rdba: 0x01400053 (file 5, block 83) found same corrupted data
Corrupt Block Found
TSN = 6, TSNAME = EXAMPLE
RFN = 5, BLK = 83, RDBA = 20971603
OBJN = -1, OBJD = 51258, OBJECT = , SUBOBJECT =
SEGMENT OWNER = , SEGMENT TYPE =
SQL> select tablespace_id,header_file,header_block
2 from sys_dba_segs s
3 where s.segment_name='EMPLOYEES' and s.owner='HR';
TABLESPACE_ID HEADER_FILE HEADER_BLOCK
------------- ----------- ------------
6 5 83
RMAN> backup validate tablespace example;
RMAN> backup as copy validate tablespace example;
SQL> select file#,block#,corruption_type from v$backup_corruption;
FILE# BLOCK# CORRUPTION_TYPE
---------- ---------- ---------------
5 83 CORRUPT
SQL> select file#,block#,corruption_type from v$copy_corruption;
FILE# BLOCK# CORRUPTION_TYPE
---------- ---------- ---------------
5 83 CORRUPT
SQL> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTION_TYPE
---------- ---------- ---------- ------------------ ---------------
5 83 1 0 CORRUPT
5 83 1 0 CORRUPT
修复物理坏块,当存在坏块备份的时候,blockrecover命令会自动跳过该备份
RMAN> run {
2> set maxcorrupt for datafile 5 to 1;
3> backup as copy tablespace example;
4> }
RMAN> blockrecover datafile 5 block 83;
Starting blockrecover at 2011-07-21-13:55:58
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=138 devtype=DISK
channel ORA_DISK_1: restoring block(s) from datafile copy
/u01/app/flash_recovery_area/ORA10G/datafile/o1_mf_example_72f9vxcn_.dbf
failover to previous backup
验证修复情况
[oracle@rhel6 ~]$ dbv userid=hr/hr segment_id=6.5.83
DBVERIFY: Release 10.2.0.1.0 - Production on Thu Jul 21 13:28:35 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
DBVERIFY - Verification starting : SEGMENT_ID = 6.5.83
DBVERIFY - Verification complete
Total Pages Examined : 8
Total Pages Processed (Data) : 5
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing (Index): 0
Total Pages Processed (Other): 2
Total Pages Processed (Seg) : 1
Total Pages Failing (Seg) : 0
Total Pages Empty : 0
Total Pages Marked Corrupt : 0
Total Pages Influx : 0
Highest block SCN : 8773930 (0.8773930)
SQL> select count(*) from hr.employees;
COUNT(*)
----------
110
本文出自 “月牙天冲” 博客