Site icon IT Tutorial

RMAN Configuration Parameters | Oracle RMAN ( Recovery Manager ) Backup Tutorials -2

Hi,

I will continue to tell you about the RMAN (Recovery Manager) tool in this second article of my tutorial series .

 

 

Read first article of my rman backup tutorial series before this article.

https://ittutorial.org/2019/03/25/oracle-rman-recovery-manager-backup-tutorials-1/

 

Now let’s continue to explain RMAN ( Recovery Manager ) configuration parameters and how to change these parameters.

 

Retention Policy: Specifies backup count taken by RMAN is stored with this parameter. RMAN stores 1 Backup by default when the database is installed. We can change this parameter to 2 as follows.

 

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

 

Since Redundancy has been changed to 2, RMAN will store 2 backups for the past, and when a third Backup is taken, the first backup will be marked as obsolete. If there is no space in the FRA (Fast Recovery Area) field, the 1st backup is automatically deleted and the last 2 backups are stored.

 

Recovery Window: This parameter specifies the time interval for storing backups. In RMAN configurations, either the Recovery Window parameter or the Redundancy parameter can be used as Retentition Policy. The Recovery Window parameter can be changed as follows.

 

RMAN> CONFIGURE RETENTION POLICY TO recovery window of 3 days;
 old RMAN configuration parameters:
 CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
 new RMAN configuration parameters:
 CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
 new RMAN configuration parameters are successfully stored

 

When we change retention policy to recovery window of 3 days, it means RMAN will store last 3 days backup. And backups are deleted older than 3 days as obsoleted if there is need for deletion.

 

Backup Optimization: This parameter specifies whether to backup of blocks that have taken again and not taken Backup or not. If this value is set ON, when a backup task is started,the backup of the previously taken data is not taken repeatedly. This value can be changed as follows.

 

RMAN> CONFIGURE BACKUP OPTIMIZATION ON;


Default Device Type: This parameter specifies whether backup will be stored to Disk unit or TAPE. By default, the value of this parameter is Disk. We can change the value of this parameter as Tape as follows.

 

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

 

Controlfile Autobackup: This parameter allows Controlfile, which is the brain of our database, to take Backup automatically during every Backup operation.  This parameter must be set to ON in the production systems database. This parameter can be changed as follows.

 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
 CONFIGURE CONTROLFILE AUTOBACKUP ON;
 new RMAN configuration parameters are successfully stored

 

ControlFile Autobackup Format For Device: This parameter is used to determine the location and device information to take backup of the control file. This value can be changed as follows.

 

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/recovery_area/ctrl_%F';
new RMAN configuration parameters:
 CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/oracle/recovery_area/ctrl_%F';
 new RMAN configuration parameters are successfully stored

 

 

Device Type Disk Paralellism: Specifies the number of parallelism when any backup process is started. It is recommended that the number of parallels be equal to or smaller than the number of physical cpu. This parameter is changed as follows.

 

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
new RMAN configuration parameters:
 CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
 new RMAN configuration parameters are successfully stored


Datafile Backup Copies: This parameter specifies how many copies of datafiles will be copied during backup. If you have enough space, this value will be 3 and it will be good for security and consistency. This value is changed as follows.

RMAN> configure datafile backup copies for device type disk to 3;

 

Archivelog Backup Copies: This parameter determines how many Archivelogs will be copied when taking Backup. This value is changed as follows.

 

RMAN> configure archivelog backup copies for device type disk to 3;




Encryption For Database: With this parameter, backups can be encrypted according to certain algorithms. We can activate this parameter as follows.

 

RMAN> CONFIGURE ENCRYPTION FOR DATABASE ON;
new RMAN configuration parameters:
 CONFIGURE ENCRYPTION FOR DATABASE ON;
 new RMAN configuration parameters are successfully stored

 

You can query the algorithms used for encryption in the Oracle database from the view below.

 

[oracle@MehmetSalih ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Mar 25 14:25:55 2019
Version 19.2.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.2.0.0.0

SQL> set lines 300
SQL> select * from v$rman_encryption_algorithms;

ALGORITHM_ID ALGORITHM_NAME                                                   ALGORITHM_DESCRIPTION                                            IS_ RES     CON_ID
------------ ---------------------------------------------------------------- ---------------------------------------------------------------- --- --- ----------
           1 AES128                                                           AES 128-bit key                                                  YES NO    0
           2 AES192                                                           AES 192-bit key                                                  NO  NO    0
           3 AES256                                                           AES 256-bit key                                                  NO  NO    0

SQL>

 

 

We can set any Algorithm as follows.

 

RMAN> CONFIGURE ENCRYPTION ALGORITHM 'AES128';
new RMAN configuration parameters:
 CONFIGURE ENCRYPTION ALGORITHM 'AES128';
 new RMAN configuration parameters are successfully stored

 

Compression Algorithm: As I mentioned above, one of the most important features of RMAN is the compressed backup. In this way, if disk space is not enough or if network connection is bad when TAPE is used then disk space problem and network traffic are solved with compression This feature can be configured as follows. Backup size shrink is very crucial for storage and network requirements.

 

RMAN> CONFIGURE COMPRESSION ALGORITHM 'HIGH';

old RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'low' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
new RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
new RMAN configuration parameters are successfully stored

 

 

Archivelog Deletion Policy: With this parameter, we determine which archivelogs should be deleted according to deletion policy. Archivelogs are generally stored for 2-3 days against possible disaster scenarios, and they are deleted older than 2-3 days. However, this option is not a rule is a recommended option. If you do not have enough free disk space, you can reduce the number of days of this parameter. This is not as safe as the scenario I described earlier. We can configure the Archivelog deletion policy as follows.

 

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DEVICE TYPE DISK;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
new RMAN configuration parameters are successfully stored

 

 

SNAPSHOT CONTROLFILE NAME: Backup information is written to the Controlfile when Backup of the database is taken. Therefore, RMAN often synchronizes itself by reading the Controlfile. Here, when RMAN wants to resynchronize itself, it creates a temporary Control file Snapshot. This parameter is an existing parameter to determine the name and location of this created Snapshot Control file. We can configure this parameter as follows.

 

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/recovery_area/SNAPFILE/snapcf_TESTDB.f';

new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/recovery_area/SNAPFILE/snapcf_TESTDB.f';
new RMAN configuration parameters are successfully stored

 

I will continue to tell Oracle RMAN in the next post.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version