The RESTORE ... VALIDATE and VALIDATE BACKUPSET commands test whether you can restore from your backups. You can test the availability of usable backups for any desired RESTORE operation, or test the contents of a specific backup for use in RESTORE operations.

RMAN decides which backup sets, datafile copies, and archived logs are needed for the operation, and scans them to verify that they are usable. For example:

Validating with RESTORE ... VALIDATE

RESTORE ... VALIDATE tests whether RMAN can restore a specific object from a backup. RMAN chooses which backups to use.

  • When validating backups with RESTORE... VALIDATE, the database can be mounted or open.
  • You do not have to take datafiles offline when validating the restore of datafiles, because validation of backups of the datafiles only reads the backups and does not affect the production datafiles.
RMAN> RESTORE CONTROLFILE VALIDATE;
RMAN> RESTORE TABLESPACE SYSTEM VALIDATE;
RMAN> RESTORE ARCHIVELOG ALL VALIDATE;
RMAN> RESTORE DATAFILE 4,5,6 VALIDATE

If you see error messages in the output and the following message, then RMAN cannot restore one or more of the specified files from your available backups:

RMAN-06026: some targets NOT found - aborting restore

If you see an error message stack and output similar to the following, for example, then RMAN encountered a problem reading the specified backup:

RMAN-03009: failure of restore command ON c1 channel at 12-DEC-01 23:22:30
ORA-19505: failed TO identify file "oracle/dbs/1fafv9gl_1_1"
ORA-27037: unable TO obtain file STATUS SVR4
Error: 2: No such file OR directory Additional information: 3

Validating With VALIDATE BACKUPSET

VALIDATE BACKUPSET tests the validity of a backup set that you specify

The BACKUP VALIDATE command requires that you know the primary keys of the backup sets that you want to validate.

To specify which backup sets to validate: Find the backup sets that you want to validate by running LIST commands, noting primary keys. For example:

RMAN> LIST BACKUP;

Validate the restore of the backup sets, referencing them by the primary keys. This example validates the restore of backup sets 56 and 57:

RMAN> VALIDATE BACKUPSET 56,57;

If the output contains the message " validation complete", then RMAN successfully validated the restore of the specified backup set. For example:

USING channel ORA_DISK_1 channel ORA_DISK_1:
starting validation of archive log backupset
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/dbs/0mdg9v8l_1_1 tag=TAG20020208T155604 params=NULL
channel ORA_DISK_1: validation complet

In the following example, we will validate the entire database along with the archived redo logs after one of the redo log files is accidentally lost:

RMAN> BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

 

 

Go to top
JSN Boot template designed by JoomlaShine.com