Friday, March 28, 2008

Blockrecovery using RMAN

Use dbv (db_verify) to find out if there are corrupted blocks.

find out file# and block# with


select * from v$database_block_corruption;

This view displays blocks marked corrupt by the most recent back with or without the VALIDATE option.

BACKUP VALIDATE DATABASE;

use rman to recover the block/s with


blockrecover datafile file# block block#

or

blockrecover corruption list;


Above is valid for Oracle 10g.

Oracle 11g is replacing the blockrecover command with recover command

recover datafile file# block block#

this searches for uncorrupted blocks in flashback logs before searching for the blocks in full or level 0 incremental backups.Block media recovery can only use redo logs for media recovery, not level 1 incremental backups.