RelationalDBDesign RelationalDBDesign


Managing File Copies   «Prev  Next»
Lesson 4Allocating a Channel
ObjectiveIdentify the use of channels with Backup Operations.

Allocating Channel in Oracle

Recovery Manager uses a concept called a channel to perform backup operations.
Whenever you begin a backup or recovery operation, you must first allocate a channel for the operation.

What is a channel?

A channel is a connection between the target database and Recovery Manager. A channel specifies both a name for the channel and the type of destination for data moved over the channel. To allocate a channel, you would use the command:

ALLOCATE CHANNEL channel_id TYPE type;
where channel_id is a unique identifier and type is either DISK, to denote a disk file, or a specific type of third-party backup device, such as a tape drive.

When do you allocate a channel?

You have to issue the allocate channel command after you begin a backup, recovery, restore, or copy job with the run command. The complete syntax for backing up a database to a single disk file is:

run {
 allocate channel c1 type disk;
 backup database;
 }

Allocating Multiple Channels

You can allocate more than one channel before beginning any backup or recovery operation. When you allocate multiple channels, Recovery Manager will perform the following operations in parallel. For instance, if you are copying five files and want to do the copying in parallel, you would first allocate five channels and then issue a single copy command with the five files listed, as shown in the following Slide Show:


  1. Create the first channel with this command
  2. Create the second channel with a similar command
  3. Create the third channel with this command
  4. Issue a COPY command for three data files
  5. Each datafile is copied through a separate channel

Using Multiple Channels
If you were to issue five separate copy commands in this same scenario, you would use only one channel.
In the next lesson, you will learn how to use tags with your backups.

ALLOCATE CHANNEL

Purpose Use the ALLOCATE CHANNEL command to manually allocate a channel, which is a connection between RMAN and a database instance. ALLOCATE CHANNEL must be issued within a REPAIR FAILURE block and applies only to the block in which it is issued.
Prerequisites: The target instance must be started.
Usage Notes: Manually allocated channels are distinct from automatically allocated channels specified with CONFIGURE. Automatic channels apply to any RMAN job in which you do not manually allocate channels. You can override automatic channel configurations by manually allocating channels within a RUN command, but you cannot use
  1. BACKUP DEVICE TYPE or
  2. RESTORE DEVICE TYPE
to use automatic channels after specifying manual channels with ALLOCATE CHANNEL.