Saturday, November 15, 2014

Configuring the RMAN Environment - Showing RMAN Configuration Settings

Problem
You want to see your current RMAN configuration settings. For example, you may be seeing unexpected RMAN behavior, or you may be encountering performance issues because of how you’ve configured RMAN in your environment.

Solution
Use the RMAN command show to view the current value of one or all of RMAN’s configuration settings. The show command will let you view the value of a specified RMAN setting. For example, the following show command displays whether the autobackup of the control file has been enabled:

RMAN> show controlfile autobackup;
RMAN configuration parameters are:
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
RMAN>

The show all command displays both settings that you have configured and any default settings. Any default settings will be displayed with a # default at the end of the line. For example, the following is the output from executing the show all command:

RMAN> connect target /
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUPTYPE 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 'ZLIB'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO
'C:\ORACLE\PRODUCT\11.1\DB_1\DATABASE\SNCFORCL.ORA'; # default
RMAN>

How It Works
The show command queries the target database control file to retrieve RMAN configuration settings. Configuration settings are stored in the target database control file regardless of whether you are using a recovery catalog. Once configured, settings persist until you change them again. Because RMAN settings are stored in the control file, your target database must
be mounted or open when issuing the show command.

The show all command reveals the present configuration regarding several important RMAN backup and recovery settings. The following list summarizes the meaning of the most important of these settings, shown by issuing the show all command:

configure retention policy to redundancy 1 means that RMAN retains only one set of backup copies.
configure backup optimization off means that by default RMAN won’t skip the backing up of unchanged data blocks in the datafiles.
configure default device type to disk means that by default RMAN sends backup output to a disk drive.
configure controlfile autobackup off means that by default RMAN doesn’t automatically back up the control files when it performs a backup task.
configure device type disk parallelism 1 backup type to backupset means that the default RMAN backup type is a backup set (and not an image copy) and the degree of parallelism is 1.
configure datafile backup copies for device type disk to 1 means that by default RMAN doesn’t make multiple copies of a backup file.
configure maxsetsize to unlimited means that there’s no limit on the size of a backup set by default.
configure encryption for database off means that by default RMAN backups aren’t encrypted.

Notice that the output of the show all command shows the existing RMAN configuration in the form of RMAN commands to re-create that configuration. Therefore, if you are planning to use the same type of configuration on a different database, just save the output from the show all command to a text file that you can then execute from the RMAN command line after connecting to the target database to which you’re planning to migrate those settings.

You can view information about RMAN’s persistent configuration settings by querying the V$RMAN_CONFIGURATION view, as shown here:

SQL> select * from v$rman_configuration;
CONF#                     NAME                                           VALUE
---------- ------------------------------                              ------------------------
        1 RETENTION POLICY                       TO REDUNDANCY 3
        2 BACKUP OPTIMIZATION                                           ON
        3 DEFAULT DEVICE TYPE TO                              sbt_tape
        4 CONTROLFILE AUTOBACKUP                                  ON
        5 DEVICE TYPE                             DISK PARALLELISM 2
5 rows selected.

The NAME column in the V$RMAN_CONFIGURATION view shows the type of RMAN configuration, and the VALUE column shows the present configure command setting for that type, for example, configure retention policy to redundancy 3.

No comments:

Post a Comment