RMAN> SHOW ALL; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 2; CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; 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 ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'E:ORACLEPRODUCT10.1.0DB_1DATABASESNCFTEST.ORA'; # default RMAN>
Changing the configuration in RMAN is easy and simple. The output of ‘SHOW ALL’ command helps to reconfigure, like:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; old RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP OFF; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored
To reset the configuration parameter to its default value, ‘CLEAR’ can be used:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP CLEAR; old RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; RMAN configuration parameters are successfully reset to default value
List of commands that clear several RMAN settings back to their default values:
RMAN> CONFIGURE RETENTION POLICY CLEAR; RMAN> CONFIGURE BACKUP OPTIMIZATION CLEAR; RMAN> CONFIGURE DEFAULT DEVICE TYPE CLEAR; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP CLEAR; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT CLEAR; RMAN> CONFIGURE DEVICE TYPE DISK CLEAR; RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK CLEAR; RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT CLEAR; RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK CLEAR; RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT CLEAR; RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR; RMAN> CONFIGURE CHANNEL DEVICE TYPE SBT CLEAR; RMAN> CONFIGURE MAXSETSIZE CLEAR; RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR; RMAN> # CONFIGURE EXCLUDE FOR TABLESPACE USERS_READ_TBS;
1. Retention Policy
Using RMAN a recovery window (have a rolling window of days) or a set redundancy (rolling number of backups) can be set to define the retention policy.
RMAN> configure retention policy to redundancy 2; new RMAN configuration parameters: CONFIGURE RETENTION POLICY TO REDUNDANCY 2; new RMAN configuration parameters are successfully stored
2. Controlfile Autobackup
RMAN can be configured to automatically backup the control file when a data file is added or when a backup is taken with CONTROLFILE AUTOBACKUP. By default CONTROLFILE AUTOBACKUP is set to OFF.
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored RMAN>
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:flash_recovery_areaautobackup%F'; new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'E:flash_recovery_areaautobackup%F'; new RMAN configuration parameters are successfully stored
4. Backup Set and Storage on Disk
RMAN can store the backup in one or more binary files called a backup set that contain data from one ore more data files, archive logs, control files or an SPFILE. These files are written in an RMAN specific format and be compressed during the creation process. Each individual file in a back set is called a backup piece.
RMAN can also create exact copies of the data files, archive logs, control files and SPFILE. These image copies are not created in an RMAN specific format.
In RMAN the type of backup is configured via the device type to be used to create the backup. By default the default device type is disk and RMAN is configured to write backup sets to disk.
RMAN> SHOW DEFAULT DEVICE TYPE; RMAN configuration parameters are: CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default RMAN> SHOW DEVICE TYPE; RMAN configuration parameters are: CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
5. Backup Set Piece Size
In order for RMAN to read or write data it must have a channel configured. In configuring the channel we can set the FORMAT, or location on disk, in which to read and write backups. The channel is also were we configure the size of the backup piece in the case of backup sets.
Like the CONTROLFILE AUTOBACKUP FORMAT, the CHANNEL FORMAT has a substitution variable %U. The %U specifies a system generated unique file name.
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'E:flash_recovery_areaTESTBACKUPSETbackup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1 G; new RMAN configuration parameters: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT 'E:flash_recovery_areaTESTBACKUPSETbackup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1 G; new RMAN configuration parameters are successfully stored
Source / Reference Links: