SCHEDULER_BACKUP

Automating RMAN backups with PL/SQL

The new Job Type BACKUP_SCRIPT introduced to DBMS_SCHEDULER in Oracle 12c allows the automation of RMAN backups completely from within PL/SQL. A shell script (Unix/Linux) or BAT File (Windows) to call RMAN and execute backups? Not needed anymore!
Now a complete backup strategy can be setup from within SQLPlus just by creating some DBMS_SCHEDULER* Jobs and Credentials.

The PL/SQL package SCHEDULER_BACKUP sets up a strategy of daily and weekly RMAN backups that start on a configurable schedule. After installing the PL/SQL package by running the provided file SCHEDULER_BACKUP.sql through SQLPlus, one more command is needed to provide the Scheduler Credentials with the account information of the OS account from which RMAN will be called and the Database account RMAN connects to. Once the setup* routine has been called, Backups are made according to schedule:

begin
  scheduler_backup.setup(os_username=>'&osuser',
                         os_passwd=>'&ospasswd',
                         db_username=>'&dbuser',
                         db_passwd=>'&dbpasswd');
end;
/
 

Last edit: SCHEDULER_BACKUP 2014-04-18