11g新特性recover corruption list

11g新特性RMAN语法recover corruption list是为了简化数据坏块的修复,在11g中recover corruption块时不需要一一指定数据文件名字了,只要是在v$database_block_corruption视图中记录的坏块,只要使用了 corruption list语法,都会试图修复。

 

下面我们使用recover .. clear命令手动造成个别数据块坏块,之后使用 recover corruption list;修复:

 

RMAN> recover datafile 8 block 100 clear;

Starting recover at 25-NOV-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK
Finished recover at 25-NOV-09

RMAN> 

RMAN> validate datafile 8 block 100;

Starting validate at 25-NOV-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00008 name=+DATA/prodb/datafile/test.262.794687963
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
8    FAILED 0              0            1               0         
  File Name: +DATA/prodb/datafile/test.262.794687963
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      1              1               

validate found one or more corrupt blocks
See trace file /s01/diag/rdbms/prodb/PRODB/trace/PRODB_ora_16689.trc for details
Finished validate at 25-NOV-09

Corrupt block relative dba: 0x02000064 (file 8, block 100)
Bad check value found during validation
Data in bad block:
 type: 30 format: 2 rdba: 0x02000064
 last change scn: 0x0000.00185030 seq: 0x1 flg: 0x04
 spare1: 0x0 spare2: 0x0 spare3: 0x0
 consistency value in tail: 0x50301e01
 check value in block header: 0xcdb0
 computed block checksum: 0x4db5
ksfdrfms:Mirror Read file=+DATA/prodb/datafile/test.262.794687963 fob=0xcdc3a6a0 bufp=0x7f81c5726000 blkno=100 nbytes=8192
ksfdrfms: Read success from mirror side=1 logical extent number=0 disk=DATA_0003 path=/dev/asm-disk7
Mirror I/O done from ASM disk /dev/asm-disk7
Trying mirror side DATA_0003.
Reread of blocknum=100, file=+DATA/prodb/datafile/test.262.794687963. found same corrupt data
ksfdrnms:Mirror Read file=+DATA/prodb/datafile/test.262.794687963 fob=0xcdc3a6a0 bufp=0x7f81c5726000 nbytes=8192
ksfdrnms: Read success from mirror side=2 logical extent number=1 disk=DATA_0002 path=/dev/asm-disk6
Mirror I/O done from ASM disk /dev/asm-disk6
Trying mirror side DATA_0002.
Reread of blocknum=100, file=+DATA/prodb/datafile/test.262.794687963. found same corrupt data
ksfdrnms:Mirror Read file=+DATA/prodb/datafile/test.262.794687963 fob=0xcdc3a6a0 bufp=0x7f81c5726000 nbytes=8192
ksfdrfms:Mirror Read file=+DATA/prodb/datafile/test.262.794687963 fob=0xcdc3a6a0 bufp=0x7f81c5726000 blkno=100 nbytes=8192
ksfdrfms: Read success from mirror side=1 logical extent number=0 disk=DATA_0003 path=/dev/asm-disk7
Mirror I/O done from ASM disk /dev/asm-disk7

SQL> select * from v$database_block_corruption;

     FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
---------- ---------- ---------- ------------------ ---------
         8        100          1            1593392 CHECKSUM

RMAN> recover corruption list;

Starting recover at 25-NOV-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
searching flashback logs for block images
finished flashback log search, restored 0 blocks

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 11/25/2009 20:17:29
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore

Comment

*

沪ICP备14014813号-2

沪公网安备 31010802001379号