Monday, June 2, 2008

Configuring RMAN parameters

RMAN (Oracle9i and higher) allows the DBA to perform automated database backup and recovery. This feature is supported by RMAN with its ability to define default values for a number of settings, (i.e. channel configuration, parallelism, automated backup of the controlfile). Setting RMAN parameters is done using the configure command.

For the purpose of this case study, I will be setting the following parameters:


Script: configure_database.rcv
run {
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/orabackup1/rman/TARGDB/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/orabackup1/rman/TARGDB/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024m;
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/orabackup2/rman/TARGDB/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024m;
}


NOTE: All configuration settings are stored persistently, and will be used by RMAN for all subsequent backup, restore, recovery, and maintenance operations.

NOTE: It is important that you save the database id (DBID) displayed in the RMAN output if you are taking RMAN backups in NOCATALOG mode or if the database name is ambigious in the Recovery Catalog. The DBID is required during disaster recovery! You will see the DBID in RMAN output when connecting to the target database as in the following output:
% rman target backup_admin/backup_admin

connected to target database: TARGDB (DBID=2528050866)

No comments: