What is an RMAN channel?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is an RMAN channel?

Rating:

An RMAN channel represents one stream of data to a device type and corresponds to one server session. It establishes a connection from the RMAN executable to a target database instance by starting a new server session on the instance. The server session then performs the backup, restore, and recovery operations. Only one RMAN session communicates with all the allocated server sessions. RMAN channels are of two types, DISK and sbt. If the channel is of DISK type, the server process reads backups from or writes backups to the disk. If the channel is of sbt type, the server process reads backups from or writes backups to a third-party media (e.g., tape). Channels are always able to read and write backups to and from a disk regardless of their type.

Channels can be allocated either manually or automatically by RMAN.

  • Manual channel allocation: The manual channel allocation feature is used to specify channels for commands used within a RUN block. Manual channel allocation is performed whenever an ALLOCATE CHANNEL or ALLOCATE CHANNEL FOR MAINTENANCE command is issued. The ALLOCATE CHANNEL command is used to manually allocate a channel for a backup, copy, or restore operation. It can be specified only within a RUN block. A manually allocated channel applies only to the RUN block in which the channel is allocated. RMAN automatically releases a manually allocated channel at the end of the job that was using the channel.

    The ALLOCATE CHANNEL FOR MAINTENANCE command is used to manually allocate a channel for maintenance operations (e.g., CHANGE, DELETE, or CROSSCHECK operation). It can be executed only at the RMAN prompt. A maintenance channel (whether allocated manually or automatically) is useful only for maintenance tasks. It cannot be used as an input or output channel for a backup or restore operation.

    Parallelization for Manually Allocated Channels: Multiple channels can be allocated manually within a RUN block, thereby allowing a single RMAN command to read or write multiple backups or image copies in parallel. Hence, the number of channels that are allocated affects the degree of parallelism within a command. When backing up on to the tape, one channel should be allocated for each physical device. However, when backing up on to the disk, multiple channels can be allocated for maximum throughput.


  • Automatic channel allocation: The automatic channel allocation feature can be used to configure a set of persistent automatic channels for use in all RMAN sessions. The need to manually allocate a channel every time a BACKUP, COPY, or RESTORE command is executed can be eliminated by configuring automatic channels with the CONFIGURE command. When a command requiring a channel is run, and a manual channel is not allocated, RMAN automatically allocates the channel by using the options specified in the CONFIGURE command. For the BACKUP command, RMAN allocates only a single type of channel, such as DISK or sbt. However, for the RESTORE and other maintenance commands (e.g., DELETE), RMAN determines which device types are required, and allocates all necessary channels.

    RMAN optimizes automatic channel allocation by leaving automatic channels allocated so long as each new command requires exactly the same channel configuration as the previous command. When an ALLOCATE or CONFIGURE command is issued to allocate a new channel, RMAN automatically releases the pre-allocated channels.

    Automatically allocated channels are mutually exclusive with manually allocated channels. Unlike manually allocated channels, automatically allocated channels apply to any RMAN job in which manual channels are not allocated. The automatic channel allocation settings can be overridden by manually allocating channels within a RUN block.

    Unless a manual channel is allocated (by executing the ALLOCATE CHANNEL command), RMAN allocates automatic channels, whenever required, according to the settings in the following RMAN configuration commands:

    1. CONFIGURE DEVICE TYPE ... PARALLELISM: It configures the device types that are eligible for use in RMAN jobs that use automatic channels and sets the degree of channel parallelism. DISK is the default device type.

      The PARALLELISM parameter specifies the number of channels that RMAN allocates when allocating automatic channels for a specified device type. RMAN always allocates the number of channels specified by PARALLELISM, although it may actually use only a subset of these channels.

      By default, PARALLELISM is set to 1. Specifying CLEAR, in place of PARALLELISM, for a device type resets its parallelism setting to the default value (1).

      To change the parallelism setting for a device type to n, a new CONFIGURE DEVICE TYPE ... PARALLELISM n command can be run. For example, the PARALLELISM can be set to 3 for sbt and then changed to 2 as follows:

      CONFIGURE DEVICE TYPE sbt PARALLELISM 3;
      CONFIGURE DEVICE TYPE sbt PARALLELISM 2;


    2. CONFIGURE DEFAULT DEVICE TYPE: It configures the default device type for automatic channels. By default, DISK is the default device type. Specifying CLEAR returns the default device type to DISK.

      By default, the BACKUP and COPY commands only allocate channels of the default device type. For example, if automatic channels are configured for DISK and sbt, and the default device type is set to DISK, RMAN allocates only DISK channels when the BACKUP DATABASE command is run. This behavior can be overridden either by manually allocating channels in a RUN block, or by specifying DEVICE TYPE with the BACKUP command itself.

      The RESTORE command allocates automatic channels of all configured device types, regardless of the default device type. The RESTORE command obeys the PARALLELISM setting for each configured device type.


    3. CONFIGURE CHANNEL [n] DEVICE TYPE: It can be used to configure generic parameter settings that are used for all automatic channels of the specified device type. It can also be used to configure parameter settings that apply to one particular automatic channel by specifying the channel number (n).

      If a generic channel is configured (i.e., if a channel number is not specified), RMAN uses the generic settings for every parallelized channel except any channel that has been configured explicitly. In other words, a generic channel setting specifies options for all channels that are not configured explicitly.

      For generic channels of a specified device type, a new command erases previous settings for the device type. For example, the second command out of the following two commands erases the MAXPIECESIZE setting of the first command.

      CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 2G;
      CONFIGURE CHANNEL DEVICE TYPE sbt RATE 1900K;
RMAN comes pre-configured with a DISK channel that can be used for disks. However, the CONFIGURE CHANNEL command can be run to specify automatic channels to disk or tape. Specifying automatic channels eliminates the need to manually allocate channels every time a backup, restore, or recovery operation is performed. Because RMAN has a pre-configured automatic DISK channel, a maintenance channel does not need to be allocated when running a CHANGE ... AVAILABLE, CROSSCHECK, or DELETE command against a file (e.g., an archived redo log, data file copy, or control file copy) that is only on disk.


Rating:



Other articles

Click here to Article home

MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+

Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g, 1Z0-040: Upgrade to OCA 10g Fundamentals I, Oracle Fundamentals II, Admin I, Oracle Admin II, PL/SQL CIW foundation    Photoshop ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.
 
HACKER SAFE certified sites prevent over 99.9% of hacker crime.