allocate channel device type disk format


Configuring parallelism for a device type specifies the number of server sessions to be used for I/O to that device type. CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 4 BACKUP TYPE TO BACKUPSET; For example, connect the RMAN client to the target and, if applicable, the recovery catalog. CREATE USER rmanadmin run { For example, assume that you run the following: In this case, RMAN clears the settings for CHANNEL 3, but leaves the settings for the generic DISK channel (the channel with no number manually assigned) intact. By default, channel parallelism for each configured device is set to 1. RMAN does not change the PARALLELISM setting for the device type because PARALLELISM is specified through a separate CONFIGURE command. For both channel connections, RMAN uses the same username and password that were entered for the target database connection. Manually allocated channels and automatic channels are never mixed.

set command id to 'ControlFile Backups'; By default, RMAN allocates a one DISK channel with default options, and uses it for backup commands. To show the default device type for backups: After connecting to the target database and recovery catalog (if you use one), run the SHOW DEFAULT DEVICE TYPE command. If you have manually assigned options to configured channels, then clear the options for these channels individually by specifying the channel number in CONFIGURE CHANNEL n DEVICE TYPE CLEAR. BLOCKSIZE 8K You can always override configured channels with ALLOCATE CHANNEL for a particular backup job surrounded by a RUN block. For example, if you back up to 20 different tape devices, then you can configure 20 different sbt channels, each with a manually assigned number (from 1 to 20) and each with a different set of channel options. Configure your default output device and default sbt channels as follows: When parallelizing, RMAN always allocates channels beginning with CHANNEL 1 and ending with channel number equal to the PARALLELISM setting. CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' TRACE 5 PARMS backup current controlfile; Configure specific channels by number when it is necessary to control the parameters set for each channel separately. After connecting to the target database and recovery catalog (if you use one), issue the SHOW CHANNEL command to display the currently configured channel settings. show all; TEMPFILE'/app/oracle/product/oradata/orabase/repos/cattemp.dbf' SIZE 20M Oracle Database Backup and Recovery User's Guide, Description of the illustration allocateformaint.gif. Besides configuring a generic channel for a device, you can also configure one or more specific channels for each device type by manually assigning your own channel numbers to the channels. Scripting on this page enhances content navigation, but does not change the content in any way. conn rmanadmin/oracle1@repos FROM user_objects; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 35 DAYS; Use the CONFIGURE CHANNEL command to configure options for DISK and sbt channels. backup archivelog all delete input; backup current controlfile; You can use the RELEASE CHANNEL command to unallocate the channel. RMAN uses the following convention for naming of maintenance channels: ORA_MAINT_devicetype_n, where devicetype refers to DISK or sbt and n refers to the channel number. By default, RMAN has preconfigured a disk channel so that you can back up to disk without doing any manual configuration. backup incremental level 1 filesperset=1 database format '%u_%p'; As a rule, you should allocate one maintenance channel for each device. set command id to 'ArchiveLogs Backup'; set command id to 'Datafiles Backups'; CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DG01/snapcf_FEDSBX01.f'; >>>>>>>level0<<<<<<< SELECT COUNT(*) This command allocates three channels for jobs on device type DISK : These commands back up to a media manager using two tape drives in parallel: Each configured sbt channel will back up roughly half the total data. When manually numbering channels, you must specify one or more channel options (for example, MAXPIECESIZE or FORMAT) for each channel. CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE'; conn sys@repos AS SYSDBA The CONFIGURE CHANNEL DEVICE TYPE CLEAR command erases the channel configuration for the specified device type. Allrightsreserved.

Specifies control options for the allocated channel. If you set the PARALLELISM for a device, and then make the device default, then RMAN uses the generic configured channel settings for each parallelized channel. You may, however, want to parallelize the channels for disk or tape devices to improve performance. Run the CONFIGURE CHANNEL n command (where n is a positive integer less than 255) to configure a specific channel. Copyright2003, 2005,Oracle. You cannot allocate a maintenance channel to a shared session. CREATE OR REPLACE SYNONYM dbms_stats FOR sys.dbms_stats; -- required for class only crosscheck backup; FROM dba_data_files; Example 2-11 Crosschecking Backups on Multiple Devices. Oracle recommends that all nodes in an Oracle RAC configuration have the same access to all backups on all storage devices, but this is not a requirement. gv$datafile; RMAN> backup incremental level 0 tag 'BU1_LEV0' database. report obsolete; Copyright2004, 2007,Oracle. Each CONFIGURE CLEAR command clears only itself. EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K; set command id to 'ArchiveLogs Backup'; Assume that you want to recycle a set of tapes by deleting all RMAN backups. Configure disk channels as follows: In this example, assume that you have two tape drives and want each tape drive to use tapes from a different tape pool. EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K Otherwise, it uses the generic configuration for channels for that device type, as specified by the CONFIGURE CHANNEL command without a channel number. The target instance must be started. CREATE BIGFILE TABLESPACE cattbsp show all; RMAN always allocates the number of channels specified in PARALLELISM, using specifically configured channels if you have configured them and generic channels if you have not. WHERE name like '%block%'; For example, after the second CONFIGURE CHANNEL command, which specifies only a FORMAT for configured disk channels, the MAXPIECESIZE for the disk channel is returned to its default value: You can also configure default settings for individual channels from a group of parallelized channels by specifying a channel number. If you are backing up to only one disk location or only one tape drive, then you need only one channel. Go to NetApp but for now: $ cd /app/oracle/product/OracleHomes/oradata/orcl, Error when you try to start db after copying one logfile to another (a common mistake), Spread the backup across several disk drives. For example, RMAN uses these names for two manually allocated disk channels: (deviceSpecifier::=, allocOperandList::=). 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. The PARALLELISM setting is not constrained by the number of specifically configured channels. The configured settings are stored in the RMAN repository.

SEGMENT SPACE MANAGEMENT AUTO The following table illustrates the channel names and channel settings that RMAN allocates when the default device is sbt and PARALLELISM for sbt is set to 3. For example, you can configure default parameters for disk and tape channels as in this example: You can configure generic channel settings for a device type, that is, a template that is used for any channels created based on configured settings for that device. For example, if the default device is sbt and PARALLELISM for sbt is set to 3, then RMAN names the channels as follows: RMAN always uses the name ORA_SBT_TAPE_n even if you configure DEVICE TYPE sbt (not the synonymous sbt_tape). -- required for class only Allocate one DEVICE TYPE DISK channel for each disk drive and specify the format string so that the filenames are on different disks, When creating multiple copies of a backup, you can specify the SET BACKUP COPIES command. Allrightsreserved. For example, enter: Sample output for SHOW DEFAULT DEVICE TYPE follows: If you manually allocate a channel during a job, then RMAN disregards any configured channel settings. For example, enter: Sample output for SHOW DEVICE TYPE follows: Issue the SHOW DEFAULT DEVICE TYPE command to display the settings for the default device type for backups. set command id to 'ControlFile Backups'; Note that if you use CONFIGURE CHANNEL to specify generic channel settings for a device, any previous settings are discarded, even if the settings are not in conflict. set echo on; Also, if you use a media manger, you must configure any required options for it, such as PARMS, FORMAT, MAXPIECESIZE, and so forth. zzyzx, # The following script creates a duplicate database that you can use. DEFAULT TABLESPACE cattbsp The CONFIGURE DEVICE TYPE CLEAR command removes the configuration for the specified device type and returns it to the default (PARALLELISM 1). In this example, you want to send disk backups to two different disks. set command id to 'Datafiles Backups'; Use the ALLOCATE CHANNEL FOR MAINTENANCE command to manually allocate a channel in preparation for issuing a CHANGE, DELETE, or CROSSCHECK command. Need to configure a backup location. As a rule, allocating one channel for each physical device is best. In this case, you can manually allocate maintenance channels with the desired settings. BACKUP_HOST=dc171dd01,ORACLE_HOME=/app/oracle/product/11.2.0/dbhome_1)'; set echo on; The example manually allocates an SBT channel, deletes all backups from tape, and then releases the channel. Example 2-12 Crosschecking in an Oracle Real Application Clusters (Oracle RAC) Configuration. When you issue the BACKUP command, RMAN allocates only default channels of the type set by the CONFIGURE DEFAULT DEVICE TYPE command. Assume that you want to crosscheck backups of archived redo logs on disk and tape. In this example, only a disk channel is configured by default. run { "About RMAN Channels" to learn about configured and allocated channels, Oracle Database Backup and Recovery Reference for ALLOCATE syntax, Oracle Database Backup and Recovery Reference' for CONFIGURE syntax. SELECT SUM(bytes) FROM delete force noprompt obsolete; CONFIGURE CONTROLFILE AUTOBACKUP ON; crosscheck backup; You can clear channel and device settings by using these commands: CONFIGURE CHANNEL n DEVICE TYPE CLEAR (where n is an integer). Query the. The CONFIGURE DEFAULT DEVICE TYPE CLEAR command clears the configured default device and returns it to DISK (the default setting). Configuring persistent channel settings greatly simplifies the use of RMAN. DEFAULT NOCOMPRESS password: ************ When you use that specific numbered channel in a backup, the configured settings for that channel will be used instead of the configured generic channel settings. QUOTA UNLIMITED ON cattbsp; FROM gv$parameter

Any backups not accessible from at least one of the nodes are marked EXPIRED after the crosscheck. SELECT name, value ONLINE; GRANT recovery_catalog_owner TO rmanadmin; By configuring channel settings, you define which parameters are used for channels RMAN allocates when you use configured channels for a backup job. report obsolete; SELECT file_name TEMPORARY TABLESPACE cattemp In such a situation, you can set PARALLELISM to any value up to the number of devices, in this instance 20. backup archivelog all delete input; You can configure persistent settings for your channels, such as channel parameters, parallelism, and the default device type for backups. CREATE BIGFILE TEMPORARY TABLESPACE cattemp Note that the channel parameters for sequential I/O devices are platform-specific. RMAN always numbers parallel channels starting with 1 and ending with the PARALLELISM setting. For example, assume that the default device type is configured to sbt, and you execute this command: In this case, RMAN uses only the disk channel that you manually allocated within the RUN block, overriding any defaults set by using CONFIGURE DEVICE TYPE, CONFIGURE DEFAULT DEVICE, or CONFIGURE CHANNEL settings. AUTOEXTEND OFF }, Oracle RMAN Backup, Recover, and Restore Demos, Create RMAN Catalog and Register the Database. set command id to 'ArchiveLogs Backup'; DATAFILE'/app/oracle/product/oradata/orabase/repos/cattbsp.dbf' SIZE 100M The following example illustrates channel connections to Oracle RAC instances inst1 and inst2. Note that you cannot disable the default device type: it is always either DISK (default setting) or sbt. backup current controlfile; The SHOW CHANNEL, SHOW DEVICE TYPE and SHOW DEFAULT DEVICE TYPE commands are used to display the current configured channel settings. set echo on; }, >>>>>>>arch<<<<<<< backup archivelog all delete input; To clear a configuration is to return it to its default settings.

It is assumed that all backups are accessible by at least one of the two nodes used in the crosscheck. backup incremental level 0 filesperset=1 database format '%u_%p'; The following example generates a single backup of the database to disk, and then creates two identical backups of datafile 1 to two different file systems, When creating a duplicate database, allocate a channel by using the AUXILIARY option, Target Database Not Running in Archive Log Mode, Configure backups to be written to disk. If you configure settings for a specific channel using CONFIGURE CHANNEL with a channel number, RMAN uses those specified configured settings. set command id to 'ControlFile Backups'; -- size basedon the formula extent_size > (block_size * 14) +1 GRANT execute ON dbms_stats TO rmanadmin; For example, CONFIGURE DEVICE TYPE CLEAR does not clear CONFIGURE DEFAULT DEVICE TYPE. This default device type setting is not in effect when you use commands other than BACKUP. 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 or proxy copies, 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 or proxy copy exists only on one node (see Example 2-12). PARALLELISM integer command specifies how many channels (up to 254) RMAN should allocate for jobs on the specified device type. Then enter: Issue the SHOW DEVICE TYPE command to display the configured devices and their PARALLELISM and backup type settings. If you configure channel settings, then you do not have to use ALLOCATE CHANNEL commands with every RMAN backup, restore, recovery or maintenance command. Execute this command only at the RMAN prompt, not within a RUN block. show all; Oracle Database Backup and Recovery Reference, "Determining Channel Parallelism to Match Hardware Devices", Oracle Database Backup and Recovery Reference', "Automatic Channel-Specific Configurations", "Configuring Specific Channels: Examples". delete force noprompt obsolete; 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. This could arise in the following situations: When running a Real Application Clusters (RAC) configuration in which individual nodes do not have access to the full set of backups, so different nodes must be configured with different connect strings so that all backups are accessible from some node, When running a Real Application Cluster and using a media manager with multiple tape drives requiring different PARMS settings. CONFIGURE CHANNEL takes the same options used to specify one-time options with ALLOCATE CHANNEL. However, you may want to change the default DISK channel settings, for example, to specify a degree of parallelism or output locations for disk backups. run { AUTOEXTEND ON BLOCKSIZE 8K 'BLKSIZE=1048576,SBT_LIBRARY=/app/oracle/product/11.2.0/dbhome_1/lib/libddobk.so,ENV=(STORAGE_UNIT=dc171dd01su02, To show the default device type and currently configured settings for disk and sbt devices: After connecting to the target database and recovery catalog (if you use one), run the SHOW DEVICE TYPE command. Assume you enter the following channel configuration: The following table illustrates the channel names and channel settings that RMAN allocates when the default device is DISK and PARALLELISM for DISK is set to 4. Specifies the type of storage for a backup. IDENTIFIED BY oracle1 }, >>>>>>>level1<<<<<<<