Simple Backup and Restore Scripts Using RMAN in Oracle Database 12c

By: Ian Abramson, Michael Abbey, Michelle Malcher, Michael Corey

Let’s have a look at a few scripts that will take advantage of Oracle RMAN.

Backup Script

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.

TABLE 1.   RMAN Backup Script Discussion Points

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.


Leave a Reply