Skip Headers
Oracle® Database Backup and Recovery Basics
10g Release 2 (10.2)

Part Number B14192-03
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

8.4 Using Multiple RMAN Channels for Maintenance Operations

This section contains these topics:

8.4.1 About Allocating Multiple RMAN Channels for Maintenance Commands

You can configure or manually allocate multiple channels before issuing CROSSCHECK or DELETE commands. RMAN searches for each backup on all channels that have the same device type as the channel used to create the backup. The multichannel feature is primarily intended for use when crosschecking or deleting backups on both disk and tape within a single command.

8.4.2 How RMAN Crosschecks and Deletes on Multiple Channels

When you configure or manually allocate multiple channels and run a CROSSCHECK or DELETE command, RMAN performs the crosscheck or delete on all channels that have the appropriate device type.

For example, assume that you prefer to manually allocate channels rather than use configured channels. You have a media manager configured, but have never made backups to tape. You have created only one backup of a database to disk, as follows:

RUN 
{
  ALLOCATE CHANNEL ch1 DEVICE TYPE DISK CONNECT 'SYS/sys_pwd@node2';
  BACKUP DATABASE;
}

Assume that you issue the following series of commands at the RMAN prompt:

ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/oracle@node1';
AlLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT 'SYS/oracle@node2';
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
CROSSCHECK BACKUP OF DATABASE;

Because the RMAN repository has a record of the database backup to disk, it crosschecks backups accessible on the two disk channels (and finds the backup on the second channel). Because the RMAN repository has no record of any sbt backups, the CROSSCHECK command does not access the allocated SBT channel.

8.4.3 Crosschecking Disk and Tape Channels with One Command: Example

If you have multiple configured channels for disk and tape, RMAN uses all configured channels to perform crosschecks on both backup destinations simultaneously.

For example, assume that you have an sbt channel configured as follows:

CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
CONFIGURE DEFAULT DEVICE TYPE sbt;

In this case you can run the following command to perform a crosscheck on both DISK and sbt:

CROSSCHECK BACKUP OF DATABASE;

RMAN uses both the sbt channel and the preconfigured DISK channel to perform the crosscheck. Sample output follows:

allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: sid=12 devtype=SBT_TAPE
channel ORA_SBT_TAPE_1: WARNING: Oracle Test Disk API
using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/dbs/16c5esv4_1_1 recid=36 stamp=408384484
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/oracle/dbs/c-674966176-20000915-01 recid=37 stamp=408384496
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=12c5erb2_1_1 recid=32 stamp=408382820
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=13c5erba_1_1 recid=33 stamp=408382829
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=14c5erce_1_1 recid=34 stamp=408382863
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=c-674966176-20000915-00 recid=35 stamp=408382869

If you do not have an automatic sbt channel configured, then can also manually allocate maintenance channels on disk and tape as in the following example:

RUN {
    ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
    CROSSCHECK BACKUP OF DATABASE;
}

Note that you do not have to manually allocate a disk channel because RMAN uses the preconfigured disk channel.

8.4.4 Crosschecking on Multiple Oracle Real Application Cluster Nodes: Example

When crosschecking on multiple nodes (and when operating RMAN in general), configure the cluster so that all backups can be accessed by every node, regardless of which node created the backup. When the cluster is configured this way, you can allocate channels at any node in the cluster during restore or crosscheck operations.

If you cannot configure the cluster so that each node can access all backups, then during restore and crosscheck operations, you must allocate channels on multiple nodes by providing the CONNECT option to the CONFIGURE CHANNEL command, so that every backup can be accessed by at least one node. If some backups are not accessible during crosscheck because no channel was configured on the node that can access those backups, then those backups are marked EXPIRED in the RMAN repository after the crosscheck.

For example, you can use CONFIGURE CHANNEL... CONNECT... in an Oracle Real Application Cluster (RAC) configuration in which tape backups are created on various nodes in the cluster and each backup is only accessible on the node on which it is created.

In this example, assume a RAC cluster with two nodes, each one of which requires a channel to access some backups for the crosscheck. You configure the channels as shown here:

CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK CONNECT 'SYS/oracle@node_1';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK CONNECT 'SYS/oracle@node_2';

Then, crosscheck the cluster nodes with the following command:

CROSSCHECK BACKUP;

8.4.5 Deleting on Disk and Tape Channels with One DELETE Command: Example

You can also perform deletions on all allocated channels. In the following example, you configure an sbt channel:

CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
CONFIGURE DEFAULT DEVICE TYPE TO sbt;

Then, you run a command to delete all backup sets from disk and tape:

DELETE BACKUPSET;

RMAN uses both the configured sbt channel and the preconfigured DISK channel when deleting. In the following sample output, note that RMAN prompts you for confirmation before deleting any files:

using channel ORA_SBT_TAPE_1
using channel ORA_DISK_1

List of Backup Pieces
BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
388     387     1   1   AVAILABLE   SBT_TAPE    12c5erb2_1_1
397     396     1   1   UNAVAILABLE SBT_TAPE    13c5erba_1_1
424     423     1   1   AVAILABLE   SBT_TAPE    14c5erce_1_1
428     427     1   1   AVAILABLE   SBT_TAPE    c-674966176-20000915-00
433     432     1   1   AVAILABLE   DISK        /oracle/dbs/16c5esv4_1_1
437     436     1   1   AVAILABLE   DISK     /oracle/dbs/c-674966176-20000915-01

Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/oracle/dbs/16c5esv4_1_1 recid=36 stamp=408384484
deleted backup piece
backup piece handle=/oracle/dbs/c-674966176-20000915-01 recid=37 stamp=408384496
deleted backup piece
backup piece handle=12c5erb2_1_1 recid=32 stamp=408382820
deleted backup piece
backup piece handle=13c5erba_1_1 recid=33 stamp=408382829
deleted backup piece
backup piece handle=14c5erce_1_1 recid=34 stamp=408382863
deleted backup piece
backup piece handle=c-674966176-20000915-00 recid=35 stamp=408382869

The following example manually allocates DISK and sbt maintenance channels and then deletes specific backup sets from both disk and tape:

RUN {
     ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;
     ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt;
     DELETE BACKUPSET 1,2,3,4,5;
}

RMAN looks for the specified backup sets on the channels and deletes any it finds. If RMAN does not find a backup on any channel, then RMAN marks the object as deleted in the control file and deletes the recovery catalog record (if you use a recovery catalog).

8.4.6 Releasing Multiple Channels: Example

You can release all allocated maintenance channels by running this command:

RELEASE CHANNEL;