Database Reference
In-Depth Information
Here are some more examples of how to preview backups required for restore and recovery:
RMAN> restore tablespace system preview;
RMAN> restore archivelog from time 'sysdate -1' preview;
RMAN> restore datafile 1, 2, 3 preview;
Validating Backup Files Before Restoring
There are several levels of verification that you can perform on backup files without actually restoring anything. If
you just want RMAN to verify that the files exist and check the file headers, then use the RESTORE...VALIDATE HEADER
command, as shown:
RMAN> restore database validate header;
This command only validates the existence of backup files and checks the file headers. You can further
instruct RMAN to verify the integrity of blocks within backup files required to restore the database data files via the
RESTORE...VALIDATE command (sans the HEADER clause). Again, RMAN will not restore any data files in this mode:
RMAN> restore database validate;
This command only checks for physical corruption within the backup files. You can also check for logical
corruption (along with physical corruption), as follows:
RMAN> restore database validate check logical;
Here are some other examples of using RESTORE...VALIDATE :
RMAN> restore datafile 1,2,3 validate;
RMAN> restore archivelog all validate;
RMAN> restore controlfile validate;
RMAN> restore tablespace system validate;
Testing Media Recovery
The prior sections covered reporting and verifying the restore operations. You can also instruct RMAN to verify the
recovery process via the RECOVER...TEST command. Before performing a test recovery, you need to ensure that the
data files being recovered are offline. Oracle will throw an error for any online data files being recovered in test mode.
In this example the tablespace USERS is restored first, and then a trial recovery is performed:
RMAN> connect target /
RMAN> startup mount;
RMAN> restore tablespace users;
RMAN> recover tablespace users test;
If there are any missing archive redo logs that are required for recovery, the following error is thrown:
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of archived log for thread 1 with sequence 6...
 
Search WWH ::




Custom Search