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

on May 30, 2015


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:

p279-02

Table 1 uses the line numbers from the listing to discuss this script.

tab6-2
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:

p280-01

Table 2 discusses this script, again using the line numbers from the listing.

tab6-3

Related Posts

Comments

Leave a Reply