- The database must be in ARCHIVELOG
- The database must be mounted or opened
The rman utility can use the following components for block recovery purposes:
- Full database backup or incremential level 0 database could be used for block recovery
- Archived redo log if available
- Flashback database logs if available
To check which blocks need recovery, you can look at:
- The V$DATABASE_BLOCK_CORRUPTION
- Results returned by the following rman commands :
- LIST FAILURE
- VALIADTE {DATABASE|TABLESPACE|DATAFILE}
- BACKUP DATABASE VALIDATE
- ANALYZE {TABLE|INDEX}
- Trace files (for location look at the V$DIAG_INFO)
- DBVERIFY utility
To revocver a block : After identifying the block number and associated file number of the corrupted block to repair, you can issue:
RMAN> RECOVER DATAFILE 4 BLOCK 2; RMAN> RECOVER DATAFILE 1 BLOCK 9 DATAFILE 4 BLOCK 254 DATAFILE 5 BLOCK 454;or to repair all block registered in the v$database_block_corruption :
RMAN> RECOVER CORRUPTION LIST;