Oracle8i Backup and Recovery Guide
Release 8.1.5

A67773-01

Library

Product

Contents

Index

Prev Prev Next


allocate

Syntax


Purpose

To establish a channel, which is a connection between RMAN and a database instance. Each connection initiates an Oracle server session on the target instance: this server session performs the work of backing up, restoring, and recovering backup sets and copies.

Each channel operates on one backup set at a time (for backup, restore, or recover) or one image copy at a time (for copy). RMAN automatically releases the channel at the end of the job.

Control the degree of parallelism within a job by the number of allocated channels. You can allocate multiple channels simultaneously, thus allowing a single job to read or write multiple backup sets or copies in parallel. If you establish multiple connections, each connection operates on a separate backup set or file copy.

Whether allocate channel causes operating system resources to be allocated depends on your operating system. On some platforms, operating system resources are allocated at the time the command is issued. On other platforms, operating system resources are not allocated until you open a file for reading or writing.


Note:

When you specify type disk, no O/S resources are allocated other than for the creation of the server session.  


Requirements

Keywords and Parameters

auxiliary  

specifies a connection between RMAN and an auxiliary database instance. An auxiliary instance is used when executing the duplicate command or performing TSPITR. An auxiliary database can reside in the same host as its parent or in a different host. When specifying this option, the auxiliary database must be mounted but not open.

See Also: To learn how to duplicate a database, see "duplicate". To learn how to connect to a duplicate database, see "connect".  

channel channel_id  

specifies a connection between RMAN and the target database instance. Each connection initiates an Oracle server session on the database instance: this server session performs the work of backing up, restoring, and recovering backups and copies.

Specify a channel id, which is the name of the channel, after the channel keyword. Oracle uses the identifier with the release channel command and to report I/O errors.  

type deviceSpecifier  

specifies the type of storage device (see "deviceSpecifier").

Note: If you do not specify the type parameter, then you must specify the name parameter to identify a particular sequential I/O device. Query the V$BACKUP_DEVICE view for information about available device types and names.  

name 'channel_name'  

specifies the name of a sequential I/O device. If you do not specify a device name, then the system uses any available device of the specified type. Do not use this parameter in conjunction with the type parameter.

Currently, no platform supports the name parameter.  

parms 'channel_parms'  

specifies parameters for the device to allocate. Do not use this port-specific string if you have specified type disk.

If you use parms in conjunction with type 'sbt_tape', you can specify environment variables. Following are models for acceptable syntax:

PARMS="ENV=(var1=value1,var2=value2,var3=value3 . . . )"
PARMS="BLKSIZE=integer"

For example, you can specify:

PARMS="BLKSIZE=16384,ENV=(NSR_SERVER=tape_server,NSR_CLIENT=oracleclnt,
NSR_GROUP=oracle_tapes)"

The maximum length of the quoted string is 1000 bytes.  

connect connectStringSpec  

specifies a connect string to the database instance where RMAN should conduct the backup or restore operations (see "connectStringSpec"). Use this parameter when you want to spread the work of backup or restore operations across different instances in an OPS configuration.

If you do not specify this parameter, and you did not specify the auxiliary option, then RMAN conducts all operations on the target database instance specified by the command-line parameter (see "cmdLine") or the instance connected to when you issued the connect command. Typically, you should not use the connect parameter in conjunction with the auxiliary option.  

debug integer  

specifies that Oracle should log debugging information about copy, backup, and restore operations performed on this channel by the target or auxiliary database to a trace file. Use this parameter only at the direction of Oracle Support: they will tell you which integer to use.  

format 'format_string'  

specifies the format to use for the names of backup pieces that are created on this channel. If you do not specify a format, RMAN uses %U by default, which guarantees a unique identifier. For available format parameters, see the backup command.

This parameter is useful if you allocate multiple disk channels and want each channel to write to a different filesystem. If you specify the format parameter in the backup command, it overrides the format parameter specified in allocate channel.  

trace integer  

specifies an integer whose meaning is determined by the media management software. Typically, this parameter controls how much diagnostic trace data is produced by the media manager.  

Examples

Allocating a Single Channel for a Backup

This command allocates a tape channel for a whole database backup:

run {
     allocate channel dev1 type 'sbt_tape';
     backup database;
    
}
Spreading a Backup Set Across Multiple Channels

When backing up to disk, you can spread your backup across several disk drives. Allocate one type disk channel per disk drive and specify the format string so that the filenames are on different disks:

run{ 
     allocate channel disk1 type disk format '/disk1/%d_backups/%U'; 
     allocate channel disk2 type disk format '/disk2/%d_backups/%U'; 
     allocate channel disk3 type disk format '/disk3/%d_backups/%U';
     backup database; 
} 
Duplexing a Backup Set

When duplexing backup sets, specify the set duplex command (see "set_run_option") before allocating a channel. The following example generates four identical backups of datafile 1:

run {
     set duplex = 4;
     allocate channel dev1 type 'sbt_tape';
     backup datafile 1;
}
Allocating an Auxiliary Channel

When creating a duplicate database (see "duplicate"), allocate a channel using the auxiliary option:

run { 
     allocate auxiliary channel c1 type disk; 
     allocate auxiliary channel c2 type disk; 
     duplicate target database to ndbnewh 
       logfile 
         '/oracle/dbs/log_1.f' size 200K, 
         '/oracle/dbs/log_2.f' size 200K 
     skip readonly 
     nofilenamecheck; 
}

Related Topics

"allocateForMaint"

"duplicate"

"cmdLine"




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index