Friday, April 01, 2011

RMAN Restore block



Steps:
1. identify file# and block# to be recoved
2. plug in the value the restore script
3. execute restore.sh

# rman_block_recover.cmd
run {
  allocate channel t1 type sbt;
  BLOCKRECOVER DATAFILE 19 BLOCK 1833660;
}

# restore.sh
. ~/.profile
ORACLE_SID=demo;ORAENV_ASK=NO;. oraenv;ORAENV_ASK=YES
cd /ora01/oracle/admin/BACKUP/WKBP
rman nocatalog target / cmdfile rman_block_recover.cmd
status=$?
exit $status

Hope this helps!Rupam