RMAN – Introduction to Parameters4 min read

RMAN or Recovery Manager is database client which is used for tasks related to backup, restore and recovery. It can automate backup strategies as per requirements.

Basic RMAN commands

We can check the current configuration using “show all” command after connecting to RMAN.

RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORACLERAC are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/snapcf_oraclera2.f'; # default

Whatever is the default configuration of the parameter will have “# default” in front of those parameters.
For setting parameters to different values we can use configure keyword.

--Example:
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters: CONFIGURE RETENTION POLICY TO REDUNDANCY 2; new RMAN configuration parameters are successfully stored

To reset any parameter value, we will combine configure with clear.

–Example:
RMAN> CONFIGURE RETENTION POLICY CLEAR;
old RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
RMAN configuration parameters are successfully reset to default value

Strategies can be implemented with help of multiple parameters which come with RMAN. These parameters are explained as follows:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

RMAN will retain only 1 copy of backup copies

CONFIGURE BACKUP OPTIMIZATION OFF; # default

The files which should be part of backup can be skipped if identical copy of that file was backed up.

Whether file is identical or not is identified on the basis of DBID, SCN (Checkpoint, Creation and Resetlogs)
The situation can differ if we try to backup datafile. Other then above mentioned conditions, below should also meet:
If Input is of datafile, then datafile should be offline or in read only mode.

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

Specify device which will be used for backup. It can be disk or tape.

CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

RMAN does not include Control file backup when backup tasks are performed but it will backup control file when any backup includes SYSTEM tablespace.
As per best practice for production systems, it is advised to keep this parameter as ‘ON’. Once ‘ON’, RMAN will backup parameter file and control file upon completion of backup task.

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default

We can specify the format of the file.
The keywords used in naming have following meanings:
%F Combination of DBID, day, month, year, and sequence
%d The name of the database
%D The current day of the month (in format DD)
%M The month (format MM)
%p The piece number within the backup set
%s The backup set number
%t The backup set time stamp
%T The year, month, and day (YYYYMMDD)
%Y The year (YYYY)

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

It specifies 2 things:

  1. Backup type is BACKUPSET
  2. Degree of parallelism is 1
-- You can also configure image copies as default by using following command
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COPY;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

By default, RMAN does not make copies of same datafile. This parameter can be tuned when you want to keep 2 or more copies of backup.

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

By default, RMAN does not make copies of same archivelog. This parameter can be tuned when you want to keep 2 or more copies of backup.

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

No limit of the size of backupset.

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

RMAN do not encrypt backups by default but if need arise then we can enable this parameter.

CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default

If encryption is used the AES128 is used by default. Other supported algorithms are listed at view v$RMAN_ENCRYPTION_ALGORITHMS

Leave a Comment

Your email address will not be published. Required fields are marked *