Validating Backups for Restore Operations

You can test whether a sufficient set of backups exists that can be used to restore the specified database files. After you specify which tablespaces to restore and, possibly, a time as of which to restore them, Oracle Recovery Manager (RMAN) selects a set of backups that contain the needed data. RMAN reads the selected backups in their entirety to confirm that they are not corrupt, but does not produce output files.

Validating the restoration of files tests whether the file can be restored given the available backups, but it does not test whether all backups of the specified object are valid.

To verify whether specified database files can be restored:

  1. Connect RMAN to the target database as described in "Connecting to the Target Database Using RMAN."
  2. Run the RESTORE … VALIDATE command to determine if the required database files can be restored.
    • To determine if the whole database can be restored:

      RESTORE VALIDATE DATABASE;
      
      Starting restore at 29-MAR-12
      using target database control file instead of recovery catalog
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: SID=129 device type=DISK
      channel ORA_DISK_1: scanning datafile copy /ade/b/191802369/oracle/work/orcva/RDBMS/datafile/o1_mf_tbs_3_7q60nj4y_.dbf
      channel ORA_DISK_1: starting validation of datafile backup set
      channel ORA_DISK_1: reading from backup piece /ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120328T051921_7q60g9oc_.bkp
      channel ORA_DISK_1: piece handle=/ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120328T051921_7q60g9oc_.bkp tag=TAG20120328T051921
      channel ORA_DISK_1: restored backup piece 1
      channel ORA_DISK_1: validation complete, elapsed time: 00:00:04
      Finished restore at 29-MAR-12
      
    • To determine if a specified tablespace can be restored:

      RESTORE TABLESPACE example VALIDATE;
      
      Starting restore at 29-MAR-12
      using channel ORA_DISK_1
      channel ORA_DISK_1: starting validation of datafile backup set
      channel ORA_DISK_1: reading from backup piece /ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120328T051921_7q60g9oc_.bkp
      channel ORA_DISK_1: piece handle=/ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120328T051921_7q60g9oc_.bkp tag=TAG20120328T051921
      channel ORA_DISK_1: restored backup piece 1
      channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
      Finished restore at 29-MAR-12
      
    • To determine if a datafile can be restored to a specified SCN:

      RESTORE DATAFILE 1 VALIDATE UNTIL SCN 23456;
      
      Starting restore at 29-MAR-12
      using channel ORA_DISK_1
      channel ORA_DISK_1: starting validation of datafile backup set
      channel ORA_DISK_1: reading from backup piece /ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120330T044454_7qc75qyd_.bkp
      channel ORA_DISK_1: piece handle=/ade/b/191802369/oracle/work/orcva/RDBMS/backupset/2012_03_28/o1_mf_nnndf_TAG20120330T044454_7qc75qyd_.bkp tag=TAG20120330T044454
      channel ORA_DISK_1: restored backup piece 1
      channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
      Finished restore at 29-MAR-12
      

See Also: