Repair corrupt blocks online (block media recovery, RECOVER CORRUPTION LIST)
OracleRMANCommand
# 1) Detect corrupt blocks (populates v$database_block_corruption):
VALIDATE CHECK LOGICAL DATABASE;
# 2) Repair all blocks in the list (the datafile stays online):
RECOVER CORRUPTION LIST;
# or the file/block from the error message (ORA-01578: file# 7, block# 233):
RECOVER DATAFILE 7 BLOCK 233;
RECOVER DATAFILE 7 BLOCK 233 DATAFILE 9 BLOCK 1001;
# 3) Verify:
VALIDATE DATAFILE 7;
SELECT * FROM v$database_block_corruption;What it does
Restores only the corrupt blocks from a backup (or from flashback logs / an Active Data Guard standby) and rolls them forward with redo; the datafile and tablespace stay online, and the application gets errors only when touching those blocks.
When to use it
When isolated block corruption appears with ORA-01578 / ORA-01110; when restoring the whole datafile would cause unnecessary downtime.
Caution
Requires a clean backup containing the block and all archivelogs from then to now; corruption caused by a NOLOGGING operation (ORA-26040) cannot be repaired this way, the object must be rebuilt. This is an Enterprise Edition feature. If you do not find the source of corruption (storage, HBA, firmware), it will recur.
Related
- Create an RMAN recovery catalog and register the database
- Create a physical standby from the active database with RMAN DUPLICATE
- Validate and clean up RMAN backup records (CROSSCHECK, EXPIRED, OBSOLETE)
- Validate the database and backups against corruption (VALIDATE)
- See which backups a restore would use and validate them (PREVIEW / VALIDATE)
- Return a tablespace to a point in the past (TSPITR)