Skip Headers
Oracle® Database Backup and Recovery Advanced User's Guide
10g Release 2 (10.2)

Part Number B14191-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring Channels

You can configure persistent settings for your channels, such as channel parameters, parallelism, and the default device type for backups. The configured settings are stored in the RMAN repository. If you configure channel settings, then you do not have to use ALLOCATE CHANNEL commands with every RMAN backup, restore, recovery or maintenance command. Configuring persistent channel settings greatly simplifies the use of RMAN.

You can always override configured channels with ALLOCATE CHANNEL for a particular backup job surrounded by a RUN block.

By default, RMAN has preconfigured a disk channel so that you can back up to disk without doing any manual configuration. You may, however, want to parallelize the channels for disk or tape devices to improve performance.

See Also:

"About RMAN Channels" for a conceptual overview of configured and allocated channels, and Oracle Database Backup and Recovery Reference for syntax

Configuring Channel Parallelism

Configuring parallelism for a device type specifies the number of server sessions to be used for I/O to that device type. By default, channel parallelism for each configured device is set to 1. As a rule, allocating one channel for each physical device is best. If you are backing up to only one disk location or only one tape drive, then you need only one channel.

The CONFIGURE DEVICE TYPE ... PARALLELISM integer command specifies how many channels (up to 254) RMAN should allocate for jobs on the specified device type. This command allocates three channels for jobs on device type DISK :

RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 3;

These commands back up to a media manager using two tape drives in parallel:

RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt; # default backup device is tape
RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 2; # configure two tape channels
RMAN> BACKUP DATABASE; # backup goes to two tapes, in two parallel streams

Each configured sbt channel will back up roughly half the total data.

Configuring Channel Settings for a Device Type

By default, RMAN allocates a one DISK channel with default options, and uses it for backup commands.

Note:

This disk channel allocated by default is not the same channel as the default channel, a disk channel which RMAN creates when it first connects to the target instance, and generally does not use for activities such as backups and restores that require large amounts of I/O.

However, you may want to change the default DISK channel settings, for example, to specify a degree of parallelism or output locations for disk backups. Also, if you use a media manger, you must configure any required options for it, such as PARMS, FORMAT, MAXPIECESIZE, and so forth. By configuring channel settings, you define which parameters are used for channels RMAN allocates when you use configured channels for a backup job.

Use the CONFIGURE CHANNEL command to configure options for DISK and sbt channels. CONFIGURE CHANNEL takes the same options used to specify one-time options with ALLOCATE CHANNEL.

For example, you can configure default parameters for disk and tape channels as in this example:

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '?/bkup_%U';
RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt 
  PARMS='SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_SERVER=tape_svr,NSR_CLIENT=oracleclnt,NSR_GROUP=ora_tapes)';

You can configure generic channel settings for a device type, that is, a template that is used for any channels created based on configured settings for that device. If you set the PARALLELISM for a device, and then make the device default, then RMAN uses the generic configured channel settings for each parallelized channel.

Note that if you use CONFIGURE CHANNEL to specify generic channel settings for a device, any previous settings are discarded, even if the settings are not in conflict. For example, after the second CONFIGURE CHANNEL command, which specifies only a FORMAT for configured disk channels, the MAXPIECESIZE for the disk channel is returned to its default value:

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 2G;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = /tmp/%U;

You can also configure default settings for individual channels from a group of parallelized channels by specifying a channel number.

Showing the Configured Channel Settings

The SHOW CHANNEL, SHOW DEVICE TYPE and SHOW DEFAULT DEVICE TYPE commands are used to display the current configured channel settings.

Showing the Currently Configured Channel Settings

After connecting to the target database and recovery catalog (if you use one), issue the SHOW CHANNEL command to display the currently configured channel settings. For example, connect the RMAN client to the target and, if applicable, the recovery catalog. Then enter:

RMAN> SHOW CHANNEL;  

Sample output for SHOW CHANNEL follows:

RMAN configuration parameters are:
CONFIGURE CHANNEL DEVICE TYPE SBT RATE 1500K;

Showing the Configured Device Types

Issue the SHOW DEVICE TYPE command to display the configured devices and their PARALLELISM and backup type settings.

To show the default device type and currently configured settings for disk and sbt devices:

After connecting to the target database and recovery catalog (if you use one), run the SHOW DEVICE TYPE command. For example, enter:

SHOW DEVICE TYPE;    # shows the CONFIGURE DEVICE TYPE ... PARALLELISM settings

Sample output for SHOW DEVICE TYPE follows:

RMAN configuration parameters are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COPY;
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

Note:

As with all SHOW commands, the output of SHOW DEVICE TYPE is in the form of a valid RMAN CONFIGURE command. You can in fact enter one command, like those shown in the preceding sample output, to configure the backup type and parallelism simultaneously. Refer to the syntax diagrams for CONFIGURE in Oracle Database Backup and Recovery Reference for details on all of the possible ways of combining arguments to the CONFIGURE command.

Showing the Default Device Type

Issue the SHOW DEFAULT DEVICE TYPE command to display the settings for the default device type for backups. When you issue the BACKUP command, RMAN allocates only default channels of the type set by the CONFIGURE DEFAULT DEVICE TYPE command. This default device type setting is not in effect when you use commands other than BACKUP. Note that you cannot disable the default device type: it is always either DISK (default setting) or sbt.

To show the default device type for backups:

After connecting to the target database and recovery catalog (if you use one), run the SHOW DEFAULT DEVICE TYPE command. For example, enter:

SHOW DEFAULT DEVICE TYPE;    # shows the CONFIGURE DEFAULT DEVICE TYPE setting

Sample output for SHOW DEFAULT DEVICE TYPE follows:

RMAN configuration parameters are:
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT';

Manually Overriding Configured Channels

If you manually allocate a channel during a job, then RMAN disregards any configured channel settings. For example, assume that the default device type is configured to sbt, and you execute this command:

RMAN> RUN 
{
  ALLOCATE CHANNEL c1 DEVICE TYPE DISK;
  BACKUP TABLESPACE users;
}

In this case, RMAN uses only the disk channel that you manually allocated within the RUN block, overriding any defaults set by using CONFIGURE DEVICE TYPE, CONFIGURE DEFAULT DEVICE, or CONFIGURE CHANNEL settings.

See Also:

Configuring a Specific Channel for a Device Type

Besides configuring a generic channel for a device, you can also configure one or more specific channels for each device type by manually assigning your own channel numbers to the channels. Run the CONFIGURE CHANNEL n command (where n is a positive integer less than 255) to configure a specific channel. When manually numbering channels, you must specify one or more channel options (for example, MAXPIECESIZE or FORMAT) for each channel. When you use that specific numbered channel in a backup, the configured settings for that channel will be used instead of the configured generic channel settings.

Configure specific channels by number when it is necessary to control the parameters set for each channel separately. This could arise in the following situations:

  • When running a Real Application Clusters (RAC) configuration in which individual nodes do not have access to the full set of backups, so different nodes must be configured with different connect strings so that all backups are accessible from some node

  • When running a Real Application Cluster and using a media manager with multiple tape drives requiring different PARMS settings

Configuring Specific Channels: Examples

In this example, you want to send disk backups to two different disks. Configure disk channels as follows:

CONFIGURE DEFAULT DEVICE TYPE TO disk;        # backup goes to disk
CONFIGURE DEVICE TYPE sbt PARALLELISM 2;      # two channels used in in parallel
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/%U' # 1st channel to disk1 
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/%U' # 2nd channel to disk2
BACKUP DATABASE; # backup - first channel goes to disk1 and second to disk2

In this example, assume that you have two tape drives and want each tape drive to use tapes from a different tape pool. Configure your default output device and default sbt channels as follows:

CONFIGURE DEFAULT DEVICE TYPE TO sbt;    # backup goes to sbt
CONFIGURE DEVICE TYPE sbt PARALLELISM 2; # two sbt channels will be allocated by default
# Assume media manager takes NSR_DATA_VOLUME_POOL to
# specify a pool
# Configure channel 1 to pool named first_pool
CONFIGURE CHANNEL 1 DEVICE TYPE sbt 
  PARMS 'SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_DATA_VOLUME_POOL=first_pool)'; 
# configure channel 2 to pool named second_pool
CONFIGURE CHANNEL 2 DEVICE TYPE sbt 
  PARMS 'SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_DATA_VOLUME_POOL=second_pool)'; 
BACKUP DATABASE; # first stream goes to 'first_pool' and second to 'second_pool'

Mixing Generic and Specific Channels

When parallelizing, RMAN always allocates channels beginning with CHANNEL 1 and ending with channel number equal to the PARALLELISM setting.

If you configure settings for a specific channel using CONFIGURE CHANNEL with a channel number, RMAN uses those specified configured settings. Otherwise, it uses the generic configuration for channels for that device type, as specified by the CONFIGURE CHANNEL command without a channel number.

Assume you enter the following channel configuration:

# disk channel configuration
CONFIGURE DEVICE TYPE DISK PARALLELISM 4;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT = '/tmp/backup_%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK MAXPIECESIZE = 20M; 
CONFIGURE CHANNEL 4 DEVICE TYPE DISK MAXPIECESIZE = 40M; 

# sbt channel configuration
CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
CONFIGURE CHANNEL DEVICE TYPE sbt 
      PARMS='SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=?/oradata)';
CONFIGURE CHANNEL 3 DEVICE TYPE sbt 
      PARMS='SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=/tmp)';

The following table illustrates the channel names and channel settings that RMAN allocates when the default device is DISK and PARALLELISM for DISK is set to 4.

Channel Name Setting
ORA_DISK_1 FORMAT = '/tmp/backup_%U'
ORA_DISK_2 MAXPIECESIZE = 20M
ORA_DISK_3 FORMAT = '/tmp/backup_%U'
ORA_DISK_4 MAXPIECESIZE = 40M

The following table illustrates the channel names and channel settings that RMAN allocates when the default device is sbt and PARALLELISM for sbt is set to 3.

Channel Name Setting
ORA_SBT_TAPE_1 PARMS='ENV=(BACKUP_DIR=?/oradata)'
ORA_SBT_TAPE_2 PARMS='ENV=(BACKUP_DIR=?/oradata)'
ORA_SBT_TAPE_3 PARMS='ENV=(BACKUP_DIR=/tmp)'

Relationship Between CONFIGURE CHANNEL and Parallelism Setting

The PARALLELISM setting is not constrained by the number of specifically configured channels. For example, if you back up to 20 different tape devices, then you can configure 20 different sbt channels, each with a manually assigned number (from 1 to 20) and each with a different set of channel options. In such a situation, you can set PARALLELISM to any value up to the number of devices, in this instance 20.

RMAN always numbers parallel channels starting with 1 and ending with the PARALLELISM setting. For example, if the default device is sbt and PARALLELISM for sbt is set to 3, then RMAN names the channels as follows:

ORA_SBT_TAPE_1
ORA_SBT_TAPE_2
ORA_SBT_TAPE_3

RMAN always uses the name ORA_SBT_TAPE_n even if you configure DEVICE TYPE sbt (not the synonymous sbt_tape). RMAN always allocates the number of channels specified in PARALLELISM, using specifically configured channels if you have configured them and generic channels if you have not.

See Also:

"Automatic Channel-Specific Configurations" for concepts about manually numbered channels, and "Configuring Specific Channels: Examples"

Clearing Channel and Device Settings

To clear a configuration is to return it to its default settings. You can clear channel and device settings by using these commands:

  • CONFIGURE DEVICE TYPE ... CLEAR

  • CONFIGURE DEFAULT DEVICE TYPE CLEAR

  • CONFIGURE CHANNEL DEVICE TYPE ... CLEAR

  • CONFIGURE CHANNEL n DEVICE TYPE ... CLEAR (where n is an integer)

Each CONFIGURE ... CLEAR command clears only itself. For example, CONFIGURE DEVICE TYPE ... CLEAR does not clear CONFIGURE DEFAULT DEVICE TYPE. The CONFIGURE DEVICE TYPE ... CLEAR command removes the configuration for the specified device type and returns it to the default (PARALLELISM 1).

Note:

You cannot specify any other options when clearing a device type.

The CONFIGURE DEFAULT DEVICE TYPE ... CLEAR command clears the configured default device and returns it to DISK (the default setting).

The CONFIGURE CHANNEL DEVICE TYPE ... CLEAR command erases the channel configuration for the specified device type. RMAN does not change the PARALLELISM setting for the device type because PARALLELISM is specified through a separate CONFIGURE command.

If you have manually assigned options to configured channels, then clear the options for these channels individually by specifying the channel number in CONFIGURE CHANNEL n DEVICE TYPE ... CLEAR. For example, assume that you run the following:

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE = 1800K;
RMAN> CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT = /tmp/%U;
RMAN> CONFIGURE CHANNEL 3 DEVICE TYPE DISK CLEAR;

In this case, RMAN clears the settings for CHANNEL 3, but leaves the settings for the generic DISK channel (the channel with no number manually assigned) intact.