DBAtlas · Atlas für Datenbankbetrieb

Korrupte Blöcke online reparieren (Block Media Recovery, RECOVER CORRUPTION LIST)

OracleRMAN

Befehl

# 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;

Was es tut

Stellt nur die korrupten Blöcke aus einem Backup (oder aus Flashback Logs / einem Active-Data-Guard-Standby) wieder her und rollt sie mit Redo vorwärts; Datafile und Tablespace bleiben online, und die Anwendung erhält nur beim Zugriff auf diese Blöcke Fehler.

Wann einsetzen

Wenn isolierte Blockkorruption mit ORA-01578 / ORA-01110 auftritt; wenn das Wiederherstellen der gesamten Datafile unnötige Ausfallzeit verursachen würde.

Vorsicht

Erfordert ein sauberes Backup mit dem Block und alle Archivlogs von damals bis jetzt; durch eine NOLOGGING-Operation verursachte Korruption (ORA-26040) lässt sich so nicht reparieren, das Objekt muss neu aufgebaut werden. Dies ist eine Funktion der Enterprise Edition. Findest du die Ursache der Korruption nicht (Storage, HBA, Firmware), tritt sie erneut auf.

In DBAtlas öffnen →

Verwandte Einträge