RMAN ‘PREVIEW’ and ‘VALIDATE’: Ensuring we have proper backups to recover a database

RMAN’s PREVIEW and VALIDATE commands if used on a regular basis (daily) can prove to be immensely useful to foresee if, a recovery will actually succeed, thereby enabling us to rectify the possibilities of failure well in advance.
PREVIEW
Description: The preview option of the restore command helps you identify all the required backups for the specified restore command(examples is usage section). Preview displays a list of all available backups needed for a restore operation. If used in the SUMMARY mode, it produces a summary report for the restore command operation.
Usage:
RMAN> restore database preview;
RMAN> restore database from tag FULL_BKP preview;
RMAN> restore datafile 1, 2 preview;
RMAN> restore archivelog all preview summary;
RMAN> restore archivelog from time ’sysdate – 1/24′ preview summary;
RMAN> restore archivelog from scn 25 preview summary;
VALIDATE
Description: VALDIATE can be used as an option on the restore command or as a command by itself (usage given below). The purpose of RMAN validation is to check for block corruption (structural) and missing backup-sets. By default ‘validate’ checks for Structural corruption but can be used to identify logical corruption by specifying CHECK LOGICAL clause on the RESTORE/ VALIDATE command.
Usage:
RMAN> restore database validate check logical;
RMAN> restore database validate;
RMAN> restore database from tag FULL_BKP validate;
RMAN> restore datafile 1 validate;
RMAN> restore archivelog all validate;
RMAN> restore controlfile validate;
RMAN> restore tablespace users validate;
—————————————————————
RMAN> validate backupset 112 check logical;
Use the RMAN> list backup; command to obtain the backupset key (112 above)
RMAN> validate database check logical;
RMAN> validate database;

=============================================================


Comments