Let’s have a look at a few scripts that will take advantage of Oracle RMAN.
The following script groups together RMAN commands in a RUN block to take a full backup of a database and its archivelogs. It assumes that you have configured the control file autobackup on in the RMAN configuration settings, and the backup retention policy is 14 days. The numbers beside each line in this case were put there by RMAN:
Table 1 uses the line numbers from the listing to discuss this script.
Restore and Recovery Script
The following is a simple script that can be used to restore then recover the database files using RMAN:
Table 2 discusses this script, again using the line numbers from the listing.