Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

RMAN Commands , 15 of 60


CONFIGURE

Syntax


Text description of configur.gif follows
Text description of the illustration configur.gif

deviceConf::=


Text description of deviceco.gif follows
Text description of the illustration deviceco.gif

backupConf::=


Text description of backupca.gif follows
Text description of the illustration backupca.gif

cfauConf::=


Text description of cfauconf.gif follows
Text description of the illustration cfauconf.gif

Purpose

To configure persistent settings affecting RMAN backup, restore, duplication, and maintenance jobs. These configurations are in effect for any RMAN session until the configuration is cleared or changed.

Use CONFIGURE to set the following:

RMAN uses default settings for CONFIGURE options. You can return to the default value for any CONFIGURE command by running the same command with the CLEAR option.

See Also:

Oracle9i Recovery Manager User's Guide to learn how to configure the RMAN environment 

Restrictions and Usage Notes

Keywords and Parameters

DEFAULT DEVICE TYPE TO deviceSpecifier 

Specifies the default device type for automatic channels. By default, DISK is the default device type. The CLEAR option returns the default device type to DISK.

By default, the BACKUP and COPY commands only allocate channels of the default device type. For example, if you configure automatic channels of type DISK and sbt, and set the default device type to DISK, then RMAN only allocates disk channels when you run the BACKUP DATABASE command. You can override this behavior either by manually allocating channels in a RUN command, or by specifying the DEVICE TYPE clause on the BACKUP command itself.

The RESTORE command allocates automatic channels of all configured device types, regardless of the default device type. The RESTORE command obeys the PARALLELISM setting for each configured device type. 

DEVICE TYPE deviceSpecifier PARALLELISM integer 

Configures the device types that are eligible for use in jobs that use automatic channels and sets the degree of parallelism. The DISK device type is the default. Specifying CLEAR for a device type resets its settings to the default values (PARALLELISM = 1).

The PARALLELISM parameter specifies the number of automatic channels of the specified device type allocated for RMAN jobs. By default, PARALLELISM = 1. For example, you can set PARALLELISM for disk backups to 3. If you configure automatic channels of type disk and tape, and set the default device type as disk, then RMAN allocates three disk channels when you run BACKUP DATABASE at the RMAN prompt.

To change the parallelism for a device type to n, run a new CONFIGURE DEVICE TYPE ... PARALLELISM n command. For example, you can change configure PARALLELISM to 3 for sbt and then change it to 2 as follows:

CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
CONFIGURE DEVICE TYPE sbt PARALLELISM 2;

Note: If you configure n manually numbered channels, the PARALLELISM setting can be greater than or less than n. For example, you can manually number ten automatic channels and configure parallelism to any value such as 2 or 12

CHANNEL integer DEVICE TYPE deviceSpecifier 

Specifies the standard or AUXILIARY channel that you are configuring or clearing, as well as the device type (DISK or sbt) of the channel. You can either configure a generic channel or specify a channel by number, where integer is less than 255.

If you configure a generic channel (that is, if you do not specify a channel number), then RMAN uses the generic settings for every parallelized channel except any channel number that you have explicitly configured. In other words, a generic channel setting specifies options for all channels not configured explicitly.

For generic channels of a specified device type, a new command erases all the previous settings for this device type. Assume that you run these two commands:

CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 1G;
CONFIGURE CHANNEL DEVICE TYPE sbt RATE 1700K;

The second command erases the MAXPIECESIZE setting of the first command.

If AUXILIARY is specified, then this configuration is used only for channels allocated at the auxiliary instance. If no auxiliary device configuration is specified, and if RMAN needs to automatically allocate auxiliary channels, then RMAN uses the target database device configuration. It is not necessary to specify configuration information for auxiliary channels unless they require different parameters from the target channels.

See Also: Oracle9i Recovery Manager User's Guide to learn how configure automatic channels specified by channel number 

 

allocOperandList 

Specifies control options for the allocated channel.

See Also: "allocOperandList" 

 

CLEAR 

Clears the specified channel. For example, CONFIGURE CHANNEL 1 DEVICE TYPE DISK CLEAR returns only channel 1 to its default, whereas CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR returns the generic disk channel to its default.

Note that you cannot specify any other channel options (for example, PARMS) when you specify CLEAR

RETENTION POLICY TO 

Specifies a persistent, ongoing policy for datafile and control file backups and copies that RMAN marks as obsolete, that is, not needed and eligible for deletion. As time passes, RMAN marks backups and copies as obsolete according to the criteria you specify in the retention policy. RMAN does not automatically delete any backups or copies: manually run the DELETE OBSOLETE command to remove obsolete files. By default, RETENTION POLICY is configured to REDUNDANCY 1.

For backups, the basic unit of the retention policy is a backup set, not a backup piece. For example, BACKUP COPIES 4 TABLESPACE users generates a single backup set that is duplexed into four identical backup pieces. The retention policy considers this as one backup, not four separate backups. 

 

RECOVERY WINDOW OF integer DAYS 

specifies a time window in which RMAN should be able to recover the database. The window stretches from the current time (SYSDATE) to the point of recoverability, which is the earliest date to which you want to recover. The point of recoverability is integer days in the past, that is, SYSDATE - integer

 

REDUNDANCY integer 

Specifies that RMAN should retain integer backups or copies of each datafile and control file. If more than integer backups or copies exist, RMAN marks these extra files as obsolete. Then, RMAN determines the oldest of the retained backups and copies, and marks all archived logs and log backups older than this backup or copy as obsolete. The DELETE OBSOLETE command removes obsolete backups and copies as well as archived log backups and copies. 

 

NONE 

Disables the retention policy feature. RMAN does not consider any backups or copies as obsolete. 

 

CLEAR 

Resets the retention policy to its default (REDUNDANCY = 1). 

MAXSETSIZE  

specifies the maximum size of each backup set created on a channel. By default MAXSETSIZE is set to UNLIMITED, meaning that it is disabled. 

 

TO integer 

Specifies the maximum set size in bytes, kilobytes (K), megabytes (M), or gigabtyes (G). The default setting is in bytes and is rounded down to kilobtyes. For example, if you set MAXSETSIZE to 5000, RMAN sets the maximum set size at 4 kilobytes (that is, 4096 bytes), which is the lower kilobyte boundary of 5000. The minimum value must be greater than or equal to the database block size. 

 

TO UNLIMITED 

Specifies that there is no size limit for backup sets. 

 

CLEAR 

Resets the maximum set size to its default value (UNLIMITED). 

{ARCHIVELOG| DATAFILE} BACKUP COPIES FOR DEVICE TYPE deviceSpecifier TO integer 

Specifies the number of copies of each backup set for DATAFILE (both datafiles and control files) or ARCHIVELOG files on the specified device type, from 1 (default) to 4. If duplexing is specified in the BACKUP command or in a SET BACKUP COPIES command, then the CONFIGURE setting is overridden. 

BACKUP OPTIMIZATION 

Toggles backup optimization ON or OFF (default). Specify CLEAR to return optimization to its default value of OFF.

Optimization does not back up a file to a device type if the identical file is already backed up on the device type. For two files to be identical, their content must be exactly the same. You can override backup optimization by using the FORCE option of the BACKUP command.

RMAN does not signal an error if optimization causes all files to be skipped during a backup. Note also that BACKUP ... DELETE INPUT deletes all specified files whether or not optimization would skip these files during a backup. 

 

Backup optimization is enabled when all of the following conditions are satisfied:

  • The CONFIGURE BACKUP OPTIMIZATION ON command has been run.

  • You run BACKUP DATABASE, BACKUP ARCHIVELOG with ALL or LIKE options, or BACKUP BACKUPSET ALL.

  • The RMAN job uses a channel of only one device type.

The retention policy has an effect on which files backup optimization skips.

See Also: Oracle9i Recovery Manager User's Guide for a description of how RMAN determines that it can skip the backup of a file 

EXCLUDE FOR TABLESPACE tablespace_name 

Excludes the specified tablespace from BACKUP DATABASE commands. Note that you cannot exclude the SYSTEM tablespace. By default, each tablespace is not excluded, that is, the exclude functionality is disabled. The exclusion is stored as an attribute of the tablespace, not the individual datafiles, so the exclusion applies to any files that are added to this tablespace in the future. If you run CONFIGURE ... CLEAR on a tablespace after excluding it, then it returns to the default configuration of "not excluded."

You can still back up the configured tablespace by explicitly specifying it in a BACKUP command or by specifying the NOEXCLUDE option on a BACKUP DATABASE command.

See Also: Oracle9i Recovery Manager User's Guide for more information about snapshot control files 

AUXNAME FOR DATAFILE datafileSpec TO 'filename' 

Configures the auxiliary filename for the specified target datafile to 'filename'. For example, you can set the auxiliary name for datafile 2 to /df2.f, and then unspecify this auxiliary name by running CONFIGURE AUXNAME FOR DATAFILE 2 NULL.

If you are performing TSPITR or running the DUPLICATE command, then by setting AUXNAME you can preconfigure the filenames for use on the auxiliary database without manually specifying the auxiliary filenames during the procedure.

For example, use this command during TSPITR if the datafiles are on raw disk and you need to restore auxiliary datafiles to raw disk for performance reasons. Typically, you set the AUXNAME parameter in TSPITR for the datafiles of the SYSTEM tablespace and the tablespaces containing rollback segments. Do not overlay files which are in use by the production database and can be discarded after TSPITR completes. In essence, the AUXNAME of a datafile is the location where TSPITR can create a temporary copy of it.

When renaming files with the DUPLICATE command, CONFIGURE AUXNAME is an alternative to SET NEWNAME. The difference is that after you set the AUXNAME the first time, you do not need to reset the filename when you issue another DUPLICATE command: the AUXNAME setting remains in effect until you issue CONFIGURE AUXNAME ... CLEAR. In contrast, you must reissue the SET NEWNAME command every time you rename files.

See Also: Oracle9i Recovery Manager User's Guide to learn how to perform RMAN TSPITR, and Oracle9i Recovery Manager User's Guide to learn how to duplicate a database 

SNAPSHOT CONTROLFILE NAME TO 'filename' 

Configures the snapshot control file filename to 'filename'. If you run CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR, then RMAN sets the snapshot control file name to its default.

The default value for the snapshot control file name is platform-specific and dependent on the Oracle home. For example, the default on some UNIX system is $ORACLE_HOME/dbs/snapcf_@.f. If you clear the control file name, and you change the Oracle home, then the default location of the snapshot control file changes as well.

See Also: Oracle9i Recovery Manager User's Guide for more information about snapshot control files 

CONTROLFILE AUTOBACKUP 

Controls the control file autobackup feature. By default, this feature is not enabled. 

 

ON 

Enables the control file autobackup feature. When ON, then RMAN automatically performs a control file autobackup in these situations:

  • After every BACKUP or COPY command issued at the RMAN prompt

  • Whenever a BACKUP or COPY command within a RUN block is followed by a command that is neither BACKUP nor COPY.

  • At the end of every RUN block if the last command in the block was either BACKUP or COPY.

The control file autobackup occurs in addition to any backup or copy of the current control file that has been performed during these commands.

RMAN automatically backs up the current control file using the default format of %F (see entry for CONFIGURE CONTROLFILE AUTOBACKUP FORMAT for an explanation of this substitution variable). You can change this format using the CONFIGURE CONTROLFILE AUTOBACKUP FORMAT and SET CONTROLFILE AUTOBACKUP FORMAT commands. 

 

OFF 

disables the autobackup feature. 

 

CLEAR 

returns the feature to its default setting of OFF

 

CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE deviceSpecifier TO 'format_string' 

Configures the default filename format for the control file autobackup on the specified device type. By default, the initial format is %F for all devices. Any default format string specified with CONFIGURE must include the %F substitution variable (see BACKUP). This variable translates into c-IIIIIIIIII-YYYYMMDD-QQ, where:

  • IIIIIIIIII stands for the DBID. The DBID is printed in decimal so that it can be easily associated with the target database.

  • YYYYMMDD is a time stamp in the Gregorian calendar of the day the backup is generated

  • QQ is the sequence in hexadecimal number that starts with 00 and has a maximum of 'FF' (256)

Specify CLEAR to return the format to the default %F

CLEAR 

Clears all user settings and returns the specified CONFIGURE command to its default value. For example, CONFIGURE RETENTION POLICY CLEAR returns the retention policy configuration to its default value of REDUNDANCY = 1. CLEAR affects only the CONFIGURE command on which it is an option. For example, the second command does not clear the configuration for the first command, whereas the last command does clear the first command:

CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR;
CONFIGURE DEVICE TYPE sbt CLEAR;
 

Examples

Configuring Backup Optimization: Example

This example configures RMAN so that the BACKUP command does not back up files to a device type if the identical file has already been backed up to the device type:

CONFIGURE BACKUP OPTIMIZATION ON;

Configuring a Retention Policy: Example

This example configures a retention policy with a recovery window of 2 weeks, and then resets the retention policy to REDUNDANCY = 1:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
CONFIGURE RETENTION POLICY CLEAR;

Configuring Automatic Disk and Tape Channels: Example

This example configures generic DISK and sbt channels, sets the default device type to sbt, and sets PARALLELISM to 3:

CONFIGURE CHANNEL DEVICE TYPE DISK RATE 5M;
CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksrv1)';
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE DEVICE TYPE sbt PARALLELISM 3;

Overriding the Default Device Type: Example

This example configures the default device type to sbt, backs up the archived logs on the default sbt channel, and then backs up the database to disk on the default disk channel:

CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(NSR_SERVER=bksrv1)';
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
BACKUP ARCHIVELOG ALL;
BACKUP DEVICE TYPE DISK DATABASE;

Configuring Automatic Channels Across File Systems: Example

This example configures automatic disk channels across three file systems:

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/backup/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/backup/%U';
CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT '/disk3/backup/%U';

Configuring Automatic Channels in an Oracle Real Application Clusters Configuration: Example

This example allocates automatic sbt channels for two nodes of an Oracle Real Application Clusters database:

CONFIGURE DEVICE TYPE sbt PARALLELISM 2;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;
CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT 'SYS/change_on_install@node1' 
  PARMS 'ENV=(NSR_SERVER=bkserv1)';
CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT 'SYS/change_on_install@node2' 
  PARMS 'ENV=(NSR_SERVER=bkserv2)';

Clearing Automatic Channels: Example

This example clears manually numbered DISK channels 2 and 3 and the generic sbt channel:

CONFIGURE CHANNEL 2 DEVICE TYPE DISK CLEAR;
CONFIGURE CHANNEL 3 DEVICE TYPE DISK CLEAR;
CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR;

Configuring and Clearing Parallelism: Example

This example sets DISK parallelism to 2, then changes it to 3, then returns it to the default parallelism of 1:

CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DEVICE TYPE DISK PARALLELISM 3;
CONFIGURE DEVICE TYPE DISK CLEAR;

Configuring Backup Copies: Example

This example configures duplexing to 3 for DISK backups of datafiles and control files and then runs a database backup:

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;
BACKUP DATABASE FORMAT '/fs1/%U', '/fs2/%U', '/fs3/%U';

Configuring the Snapshot Control File Location: Example

This example configures a new location for the snapshot control file and then resynchronizes the recovery catalog.

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/dbs/snap.cf';

Excluding a Tablespace from a Whole Database Backup: Example

This example excludes the read-only reports tablespace from whole database backups, and then returns the reports tablespace to the default behavior of "not excluded":

CONFIGURE EXCLUDE FOR TABLESPACE reports;
CONFIGURE EXCLUDE FOR TABLESPACE reports CLEAR;

Specifying Auxiliary Filenames: Example

This example duplicates a database to a remote host with a different directory structure, by using CONFIGURE AUXNAME to specify new filenames for the datafiles:

# set auxiliary names for the datafiles 
CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f'; 
CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f'; 
CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f'; 
CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f'; 

RUN
{  
  ALLOCATE AUXILIARY CHANNEL dupdb1 tYPE DISK;
  DUPLICATE TARGET DATABASE TO dupdb 
  LOGFILE
    GROUP 1 ('$ORACLE_HOME/dbs/dupdb_log_1_1.f', 
             '$ORACLE_HOME/dbs/dupdb_log_1_2.f') SIZE 200K, 
    GROUP 2 ('$ORACLE_HOME/dbs/dupdb_log_2_1.f', 
             '$ORACLE_HOME/dbs/dupdb_log_2_2.f') SIZE 200K REUSE; 
}
# Un-specify the auxiliary names for the datafiles so that they are not overwritten 
# by mistake:
CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR; 
CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR; 

Specifying the Default Format for the Control File Autobackup: Example

This example turns on the autobackup feature, then changes the default format for the DISK and sbt devices, then clears the autobackup setting:

CONFIGURE CONTROLFILE AUTOBACKUP ON; 
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backup_dir/%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'cf_auto_%F';
CONFIGURE CONTROLFILE AUTOBACKUP CLEAR;   # returns to default setting of OFF

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback