Channel allocation is a method of connecting RMAN and the target database while also determining the type of I/O device that the server process will use to perform the backup or restore operation. Figure 1.2 illustrates this situation. The I/O device can be either tape or disk. Channels can be allocated manually or automatically.
Manual channel allocation is performed any time you issue the command ALLOCATE CHANNEL. A manual command for allocating a channel is ALLOCATE CHANNEL channel name TYPE DISK. This is used for writing to a disk file system. The command ALLOCATE CHANNEL channel name TYPE 'SBT_TAPE' is another manual method used for writing to a tape backup system. These are the most common channel allocation usages. Allocating a channel is initiated with the ALLOCATE CHANNEL command, which starts a server process on the server of the target database.
Automatic channel allocation is performed by setting the RMAN configuration at the RMAN command prompt. This is done by using the CONFIGURE DEFAULT DEVICE or CONFIGURE DEVICE command. Automatic channel allocation is automatically used when executing the BACKUP, RESTORE, or DELETE commands. The complete listing of automatic channel allocation is as follows:
CONFIGURE DEVICE TYPE DISK backup|clear|parallelism n CONFIGURE DEFAULT DEVICE TYPE to|clear CONFIGURE CHANNEL DEVICE TYPE disk|equal CONFIGURE CHANNEL n DEVICE TYPE disk|equal
There are some default naming conventions for the devices ORA_MAINT_DISK_n and ORA_SBT_TAPE_n. The following example shows that the default device type is set to disk and parallelism is set to 1. This means that if you don't allocate a channel manually, the parameters will be listed as follows:
RMAN> show all; RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:ORACLEPRODUCT10.1.0DB_1DATABASES NCFORA101T.ORA'; # default RMAN>
There are also channel control options or commands that are used whether channels are allocated manually or automatically. Channel control options or channel control commands basically control the operating system resources that RMAN uses when performing RMAN operations. Channel control options or commands perform the functions described in Table 1.3.
New with Oracle 10g is an automated channel failover for backup and restore operations. In order for this feature to function, multiple channels must be allocated. If there is a failure in the backup or restore operations, RMAN will complete the operation with the available channels. This can commonly happen when multiple backups attempt to use a one tape device or when there is an MML problem of some sort.
Error messages are reported in the V$RMAN_OUTPUT dynamic view. Error information is also logged to the screen or the RMAN log file when MML comes across any problems.