文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc2.htm#i1008221
Block Media Recovery with RMAN
Although datafile media recovery is the principal formof recovery, you can also use the RMAN BLOCKRECOVER
command to performblock media recovery. Block mediarecovery recovers an individual corrupt datablock or set ofdatablocks within a datafile. In cases when a small number ofblocks require media recovery, you can selectively restore andrecover damaged blocks rather than whole datafiles.
Block media recovery provides several advantages over datafilemedia recovery. For example, block media recovery
-
Lowers the Mean Time to Recovery (MTTR) because onlyblocks needing recovery are restored and only necessary corruptblocks undergo recovery. Block media recovery minimizes redoapplication time and avoids I/O overhead during recovery.
-
Allows affected datafiles to remain online during recovery ofthe blocks. Without block-level recovery, if even a single block iscorrupt, then you must restore a backup of the entire datafile andapply all redo generated for that file after the backup wascreated.
Note these restrictions of block media recovery:
-
You can only perform block media recovery with RMAN. No SQL*Plusrecovery interface is available.
-
You can only perform complete recovery of individual blocks. Inother words, you cannot stop recovery before all redo has beenapplied to the block.
-
You can only recover blocks marked media corrupt. The
V$DATABASE_BLOCK_CORRUPTION
view indicates whichblocks in a file were marked corrupt since the most recentBACKUP
orBACKUP
...
VALIDATE
command was run against the file. -
You must have a full RMAN backup. Incremental backupsare not used by block media recovery. Proxy backups are also notused by block media recovery. Only full backups and archived logfiles are used.
-
Block media recovery is able to restore blocks from parentincarnation backups and recover the corrupted blocks through a
RESETLOGS
. -
Blocks that are marked media corrupt are not accessible to usersuntil recovery is complete. Any attempt to use a block undergoingmedia recovery results in an error message indicating that theblock is media corrupt.
Using BACKUP... VALIDATE
Using the RMAN BACKUP... VALIDATE command causes RMAN to readall of the specified database files that would be input for aspecific backup task, without actually producing any backups asoutput. For example, BACKUP DATABASE VALIDATE causes RMAN to readall files that would be backed up in backing up the entire databaseand ensure that they are intact and not corrupted. All of the datablocks in the input files are validated, exactly as they are when areal backup takes place. This process can provide a usefulintegrity check for your database.