How to Setup Oracle RMAN environment parameters

In this paper we will see what options we have in setting up our RMAN environment.

  • To get an idea of what parameters are there to play with use the "show all" command.

 RMAN show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DB1 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/11.2.0/dbhome_1/dbs/snapcf_db1.f'; # default
This is default RMAN setup. We will take each one of them and se thei options
  • Enabling Automatic Control File Backups.

 RMAN configure controlfile autobackup on;

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
Enable the control file autobackup feature if you aren't using a recovery catalog. If you set this parameter to ON, SPFILE will also be automatically included in the control file backup piece.
  • Disabling Automatic Control File Backups.

 RMAN configure controlfile autobackup off;

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
new RMAN configuration parameters are successfully stored
  • You can choose controlfile autobackup format.

 configure controlfile autobackup format for device type disk to '/u01/app/oracle/fra/controlfile_%F';
%F means the database ID, day, month, year, and sequence.
  • Specifying the default device type.

To disk:
 RMAN configure default device type to disk;

new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
Or to Tape:
 RMAN configure default device type to sbt;

old RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
new RMAN configuration parameters are successfully stored
  • Specifying the default backup type.

To backupset:
 RMAN configure device type disk backup type to backupset;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY PARALLELISM 1;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET PARALLELISM 1;
new RMAN configuration parameters are successfully stored
To copy image:
 RMAN configure device type disk backup type to copy;

new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY PARALLELISM 1;
new RMAN configuration parameters are successfully stored
  • Specifying compressed backup sets.

 RMAN configure device type disk backup type to compressed backupset;
  • Specifying the Parallelism for Channels.

 RMAN configure device type disk parallelism 2;
It's best to allocate only one channel for each physical device on the server.
  • Specifying the Maximum Backup Piece Size.

 RMAN configure channel device type disk maxpiecesize 1024m;
This will create backup pieces not bigger then 1Gb.
  • Specifying Backup Retention Policy.

 RMAN configure retention policy to recovery window of 7 days;

new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters are successfully stored
This is a Backup Retention Policy Based on a Recovery Window(Time retention).
  • If you want to clear the given configuration, use the configure command with the clear option:

RMAN configure controlfile autobackup clear;
RMAN configure snapshot controlfile name clear;
RMAN configure backup optimization clear;
RMAN configure retention policy clear;