Specifies the standard or AUXILIARY channel that you are configuring or clearing, as well as the device type (DISK or sbt) of the channel. You can either configure a "generic channel" or specify a channel by number, where "integer" is less than 255. Next let's look at setting defaults for channels. You can either set default settings for all channels with the configure channel device type command or you can set defaults for a specific channel using the configure channel n device type, where n is the channel you want to set for.
Now, let's take a look at the general syntax:
CHANNEL integer DEVICE TYPE deviceSpecifier allocOperandList; integer You can specify a channel by number. You may also exclude an integer, in which case you are specifying a general channel. deviceSpecifier {DISK | SBT} allocOperandList /* Specifies control options for the */ /* allocated channel */ [PARMS = 'channel_parms'] [CONNECT = (quoted string)] [FORMAT = 'format_sring'] [MAXPIECESIZE = integer [K|M|G]] [RATE = integer [K|M|G]] [MAXOPENFILES = integer] [SEND = 'command']I generally use this parameter to configure the location (directory) and file format where RMAN will write disk backups to. Here are some of the substitution variables that can be used in the backup set file name: |%d Database name %s Backup set number %p Backup piece number %t 4-byte timestampWhen automated channels are allocated, Oracle assigns default names to these channels. These default names depend on the type of default device used. The following table provides the default name format that will be used for each device:
Default Device Type Default Name Format Example Disk ORA_DISK_n ORA_DISK_1, ORA_DISK_2 Tape ORA_SBT_TAPE_n ORA_SBT_TAPE_1, ORA_SBT_TAPE_1
Now let's look at setting the number of channels to be allocated during an automated backup or recovery operation. This example will set the default level of parallelism for disk operations to two. Now, if an automated backup is started, two channels will be allocated to perform the backup in parallel:
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2; RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/orabackup1/rman/ORA920/backup_db_%d_S_%s_P_%p_T_%t'; RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/orabackup2/rman/ORA920/backup_db_%d_S_%s_P_%p_T_%t';
NOTE: When setting the default level of parallelism, you should set it to the number of disks or tape drives attached to which you will be backing up.
You can also control the size of a backup set piece or the entire backup itself. In the following example, I will limit channel 1 to create each individual backup piece at a maximum size of 1024MB. Take note that this command does not limit the overall size of the backup:
RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/orabackup1/rman/ORA920/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024m;
You can also set to limit all channels to have a limit of 1024MB by using:
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/orabackup/rman/ORA920/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024m;
You can also limit the speed or rate of the backup channel:
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/orabackup/rman/ORA920/backup_db_%d_S_%s_P_%p_T_%t' MAXPIECESIZE 1024m RATE 5m;
NOTE: If you configure a generic channel (that is, if you do not specify a channel number), then RMAN uses the generic settings for every parallelized channel except any channel number that you have explicitly configured. In other words, a generic channel setting specifies options for all channels not configured explicitly.
NOTE: The RATE parameter is intended to slow down a backup so that you can run it in the background with as little effect as possible on OLTP operations. The RATE parameter specifies units of bytes/second. Test to find a value that improves performance of your queries while still letting RMAN complete the backup in a reasonable amount of time. Note that RATE is not designed to increase backup throughput, but to decrease backup throughput so that more disk bandwidth is available for other database operations.
NOTE: The CONNECT parameter specifies a connect string to the database instance where RMAN should conduct the backup or restore operations. Use this parameter to spread the work of backup or restore operations across different instances in an Oracle Real Application Clusters configuration. If you do not specify this parameter, and if you did not specify the AUXILIARY option, then RMAN conducts all operations on the target database instance specified by the command-line parameter 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.
NOTE: We can also assign specify an assigned name to channels that you allocate when using the allocate channel command. For example the following command will create a channel named c1: RMAN> run {... allocate channel c1 device type disk; ...}
NOTE: If AUXILIARY is specified, then this configuration is used only for channels allocated at the auxiliary instance. If no auxiliary device configuration is specified, and if RMAN needs to automatically allocate auxiliary channels, then RMAN uses the target database device configuration. It is not necessary to specify configuration information for auxiliary channels unless they require different parameters from the target channels.
NOTE: For generic channels of a specified device type, a new command erases previous settings for this device type. Assume that you run these commands: CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 1G; CONFIGURE CHANNEL DEVICE TYPE sbt RATE 1700K;The second command erases the MAXPIECESIZE setting of the first command.
NOTE: It is useful to understand how the CLEAR command works for this parameter. CLEAR Clears the specified channel. For example, CONFIGURE CHANNEL 1 DEVICE TYPE DISK CLEAR returns only channel 1 to its default, whereas CONFIGURE CHANNEL DEVICE TYPE DISK CLEAR returns the generic disk channel to its default. Note that you cannot specify any other channel options (for example, PARMS) when you specify CLEAR.
Tuesday, 27 November 2012
RMAN CHANNEL CONFIGURATION
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment