Configuring persistent settings or parameters for RMAN is handled through the configuration settings for each target database. There are many RMAN settings that help automate or simplify using RMAN. Be familiar with where these settings are located and how to modify them for a particular database environment. These settings are stored in the target databases control file or the recovery catalog.
This section explains how to display and set configuration parameters for RMAN and demonstrates these features with examples. You will then walk through the new RMAN parameters in Oracle 10g.
Let's show how you can display the configuration for a particular RMAN session. This is a fairly straightforward process that requires logging into RMAN and performing the SHOW ALL command:
Set the Oracle SID for the target database:
C:Documents and Settingsdstuns>set ORACLE_SID=ora101c
Launch the RMAN utility from the command line:
C:Documents and Settingsdstuns>rman Recovery Manager: Release 10.1.0.2.0 - Production Copyright (c) 1995, 2004, Oracle. All rights reserved. RMAN>
Connect to the target database:
RMAN> connect target connected to target database: ORA101C (DBID=1736563848) RMAN>
Perform the show all command to display all the configuration parameters:
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 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 CHANNEL DEVICE TYPE DISK FORMAT" '/oracle/flash_recovery_area/ ora101c /%rec_area_%s_%p.bak'; CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:ORACLEPRODUCT10.1.0DB_ 1DATABASES
NCFORA101C.ORA'; # default RMAN>
There are some commonly used configuration settings that help you use RMAN. These settings are useful in daily operations:
DEVICE TYPE
BACKUP TYPE
COMPRESSED BACKUPSET
CHANNEL DISK DEVICE
CHANNEL TAPE DEVICE
Let's learn how to modify or set each of these configuration settings in more detail. To configure the default device to tape and then to disk, use the following command. This command sets the default media for RMAN to store the backup information:
RMAN>configure default device type to sbt; RMAN>configure default device type to disk;
To configure the default backup type for an image copy and then for a backup set, use the following command. This parameter or setting configures the type of backup to be an image copy or a backup set:
RMAN>configure device type disk backup type to copy; RMAN>configure device type disk backup type to backupset;
To configure a default device for either tape or disk to a compressed backup set, here are two specific examples:
RMAN>configure device type disk backup type to compressed backupset; RMAN>configure device type sbt backup type to compressed backupset;
To configure disk devices and channels for specific formats, the next example shows that a channel is storing the output on disk and storing the name with the specific naming format. The ora_dev_' string is concatenated to a special naming format. Formatting is an excellent method of naming your backups uniquely for easy identification.
NOTE
See the following sidebar, "Format Specifications for the 10g RMAN FORMAT Option," for a more detailed listing of the FORMAT option's formatspec values. The complete information can be found in the Oracle Database 10g Recovery Manager Reference Guide, part number B10770-02.
Let's look at an example of configuring a disk device and channel for a specific format:
RMAN>configure channel device type disk format 'C:ackupora101c ora_dev_f%t_s%s_s%p';
The next example demonstrates how to configure tape devices and channels to utilize specific media management capabilities that control the tape hardware. In this case, some media managers allow you to pass in configuration settings with a PARMS string in the CONFIGURE command. Let's look at this example:
RMAN>configure channel device type sbt PARMS='ENV=mml_env_settings'; RMAN>configure device type sbt parallelism 3;