By default, the backup of the control file and server parameter file does not occur automatically. RMAN can be configured to back up the control file and server parameter file automatically either any time a successful backup must be recorded in the repository or when a structural change affects the contents of the control file.

If the database runs in ARCHIVELOG mode, then an autobackup is also taken whenever the database structure metadata in the control file changes.

A Control file Autobackup enables RMAN to recover the database even if the current control file, recoverycatalog, and server parameter file are lost.

Some common operation regarding configuring RMAN Control Autobackup are listed below.

  1. Enable Control file Autobackup
  2. Disable Control file Autobackup
  3. Configure Control file Autobackup format
  4. Clear Control file Autobackup format
  5. Override Control file Autobackup format

Enable Control file Autobackup

You can enable the control file autobackup feature by issuing following command:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;

Disable Control file Autobackup

You can disable the control file autobackup feature by issuing following command:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP OFF;

Configure Control file Autobackup format

By default, the format of the autobackup is the substitution variable %F. This variable format translates into
c-IIIIIIIIII-YYYYMMDD-QQ

IIIIIIIIII     stands for the DBID.
YYYYMMDD         is a time stamp of the day the backup is generated.
QQ                    is the hex sequence that starts with 00 and has a maximum of FF.

Use following command to set the control file autobackup format.

CONFIGURE CONTROLFILE AUTOBACKUP 
FORMAT FOR DEVICE TYPE deviceSpecifier TO 'string';

deviceSpecifier is any valid device type.
'string' must contain the substitution variable %F (and no other substitution variables)

Set a nondefault filename for the control file autobackup.

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT 
FOR DEVICE TYPE DISK TO '?/oradata/cf_%F';

In the filename, ? stands for ORACLE_HOME

Configure control file Autobackup to write to an Automatic Storage Management disk group.

CONFIGURE CONTROLFILE AUTOBACKUP 
FOR DEVICE TYPE DISK TO '+dgroup1/%F';

Clear Control file Autobackup format

To clear control file autobackup format, use following commands:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt CLEAR; 

If flash recovery area is enabled, then you can direct control file autobackups to the flash recovery area by clearing the control file autobackup format for disk.

Override Control file Autobackup format

You can override control file autobackup format by using  SET CONTROLFILE AUTOBACKUP FORMAT command.

Overrides in the current session until the RMAN client exits.

RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'controlfile_%F';
RMAN> BACKUP AS COPY DATABASE;

Overrides for the duration of RUN block.

RUN
{
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/%F.bck';
BACKUP AS BACKUPSET
DEVICE TYPE DISK
DATABASE;
}

 

Go to top
JSN Boot template designed by JoomlaShine.com