ALLOCATE CHANNEL FOR MAINTENANCE command to manually allocate a channel in preparation for issuing a
CROSSCHECK command. You can use the
RELEASE CHANNEL command to unallocate the channel.
CONFIGUREat least one channel for each device type in your configuration, then you do not need to use
ALLOCATE CHANNEL FOR MAINTENANCE. It is recommended that you use configured channels instead of maintenance channels. You can use configured channels for all RMAN I/O to the specified device, not just the maintenance tasks supported by maintenance channels. The configured channels persist across RMAN sessions.
As a rule, you should allocate one maintenance channel for each device. Manually allocated channels and automatic channels are never mixed. In general, you should allocate multiple maintenance channels for a single job only in these situations:
To enable crosschecking or deletion of all backup pieces both on disk and tape, with a single command (see Example 2-11)
To make crosschecking and deleting work correctly in an Oracle RAC configuration in which each backup piece exists only on one node (see Example 2-12)
RMAN uses the following convention for naming of maintenance channels:
devicetype refers to
n refers to the channel number. For example, RMAN uses these names for two manually allocated disk channels:
See Also:Oracle Database Backup and Recovery User's Guide to learn how to crosscheck and delete on multiple channels
||Specifies the type of storage for a backup. Query the
||Specifies control options for the allocated channel. The channel parameters for sequential I/O devices are platform-specific.
Assume that you want to recycle a set of tapes by deleting all RMAN backups. In this example, only a disk channel is configured by default. The example manually allocates an SBT channel, deletes all backups from tape, and then releases the channel.
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt; allocated channel: ORA_MAINT_SBT_TAPE_1 channel ORA_MAINT_SBT_TAPE_1: SID=135 device type=SBT_TAPE channel ORA_MAINT_SBT_TAPE_1: Oracle Secure Backup RMAN> DELETE NOPROMPT BACKUP; List of Backup Pieces BP Key BS Key Pc# Cp# Status Device Type Piece Name ------- ------- --- --- ----------- ----------- ---------- 9957 9954 1 1 AVAILABLE SBT_TAPE 8oic41ad_1_1 9974 9972 1 1 AVAILABLE SBT_TAPE c-28014364-20070308-17 10024 10021 1 1 AVAILABLE SBT_TAPE 8qic41c3_1_1 10045 10042 1 1 AVAILABLE SBT_TAPE c-28014364-20070308-18 10446 10443 1 1 AVAILABLE SBT_TAPE 8uic47fg_1_1 10487 10482 1 1 AVAILABLE SBT_TAPE 90ic47ih_1_1 10488 10483 1 1 AVAILABLE SBT_TAPE 91ic47j1_1_1 10524 10514 1 1 AVAILABLE SBT_TAPE 92ic47q4_1_1 10540 10538 1 1 AVAILABLE SBT_TAPE c-28014364-20070308-1a deleted backup piece backup piece handle=8oic41ad_1_1 RECID=198 STAMP=616695118 deleted backup piece backup piece handle=c-28014364-20070308-17 RECID=199 STAMP=616695145 deleted backup piece backup piece handle=8qic41c3_1_1 RECID=200 STAMP=616695171 deleted backup piece backup piece handle=c-28014364-20070308-18 RECID=201 STAMP=616695188 deleted backup piece backup piece handle=8uic47fg_1_1 RECID=204 STAMP=616701424 deleted backup piece backup piece handle=90ic47ih_1_1 RECID=205 STAMP=616701521 deleted backup piece backup piece handle=91ic47j1_1_1 RECID=206 STAMP=616701538 deleted backup piece backup piece handle=92ic47q4_1_1 RECID=207 STAMP=616701764 deleted backup piece backup piece handle=c-28014364-20070308-1a RECID=208 STAMP=616701783 Deleted 11 objects RMAN> RELEASE CHANNEL; released channel: ORA_MAINT_SBT_TAPE_1
Assume that you want to crosscheck backups of archived redo log files on disk and tape. Assume also that you have the default device type configured to disk, and also have an SBT channel configured, but you want to use different channel settings for both disk and tape. In this case, you can manually allocate maintenance channels with the desired settings.
RMAN> SHOW DEFAULT DEVICE TYPE; RMAN configuration parameters for database with db_unique_name PROD are: CONFIGURE DEFAULT DEVICE TYPE TO DISK; RMAN> SHOW CHANNEL; RMAN configuration parameters for database with db_unique_name PROD are: CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so, ENV=(OB_DEVICE_1=stape1)'; RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE sbt PARMS 'SBT_LIBRARY=/usr/local/oracle/backup/lib/libobk.so, ENV=(OB_DEVICE_1=stape2)'; allocated channel: ORA_MAINT_SBT_TAPE_1 channel ORA_MAINT_SBT_TAPE_1: SID=135 device type=SBT_TAPE channel ORA_MAINT_SBT_TAPE_1: Oracle Secure Backup RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK FORMAT "/disk2/%U"; allocated channel: ORA_MAINT_DISK_2 channel ORA_MAINT_DISK_2: SID=101 device type=DISK Finished Control File and SPFILE Autobackup at 09-MAR-07 RMAN> CROSSCHECK BACKUP OF ARCHIVELOG ALL; crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/disk2/95ic69jc_1_1 RECID=210 STAMP=616769132 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/disk2/96ic69jf_1_1 RECID=211 STAMP=616769135 Crosschecked 2 objects crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/disk2/96ic69jf_1_1 RECID=211 STAMP=616769135 Crosschecked 1 objects RMAN> RELEASE CHANNEL; released channel: ORA_MAINT_SBT_TAPE_1 released channel: ORA_MAINT_DISK_2
All nodes in an Oracle RAC configuration should have the same access to all backups on all storage devices, but this is not a requirement. Assume that you want to crosscheck backups on two nodes of an Oracle RAC configuration, where each node has access to a subset of disk backups. It is assumed that all backups are accessible by at least one of the two nodes used in the crosscheck. Any backups not accessible from at least one node are marked
EXPIRED after the crosscheck.
The following example illustrates channel connections to Oracle RAC instances
inst2. For both channel connections, RMAN uses the same user name and password that were entered for the target database connection.
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT '@inst1'; ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK CONNECT '@inst2'; CROSSCHECK BACKUP;