Oracle® Database Backup and Recovery Reference 11g Release 2 (11.2) Part Number E10643-06 |
|
|
PDF · Mobi · ePub |
Use the CONFIGURE
command to create or change a persistent configuration affecting RMAN backup, restore, duplication, and maintenance jobs on a particular database. A configuration is in effect for any RMAN session on this database until the configuration is explicitly cleared or changed. You can use the SHOW
command to display the configurations for one or more databases.
See Also:
Oracle Database Backup and Recovery User's Guide to learn how to configure the RMAN environmentExecute this command only at the RMAN prompt.
Unless you specify the FOR DB_UNIQUE_NAME
clause, an RMAN connection to a target database is required. The target database must be mounted or open.
The CONFIGURE
command always stores a configuration for a target database in the target database control file. If you use RMAN with a recovery catalog, then RMAN also stores persistent configuration settings for each registered database in the catalog.
Default RMAN Configuration Settings
The RMAN CONFIGURE
settings have defaults. You can return to the default for any CONFIGURE
command by rerunning the command with the CLEAR
option, but you cannot clear individual parameters in this way. For example, the following command is valid:
CONFIGURE CHANNEL DEVICE TYPE sbt CLEAR
However, the following command is invalid:
CONFIGURE CHANNEL DEVICE TYPE sbt MAXPIECESIZE 5M CLEAR
RMAN Configuration in a Data Guard Environment
In a Data Guard environment, Oracle recommends that you always use RMAN with a recovery catalog. You can use the CONFIGURE
command to create persistent RMAN configurations for any individual primary or standby database in the Data Guard environment, except for settings for backup retention policy, tablespace exclusion, and auxiliary names. Thus, the primary and standby databases can have different channel configurations, control file autobackup locations, and so on.
You can use the FOR DB_UNIQUE_NAME
clause to configure a database to which RMAN is not connected as TARGET
. You can use CONFIGURE DB_UNIQUE_NAME
to make a new physical standby database known to the recovery catalog and implicitly register it.
configure::=
(datafileSpec::=, backupConf::=, cfauConf::=, deviceConf::=, forDbUniqueNameOption::=)
delalConf::=
backupConf::=
(deviceSpecifier::=, sizeSpec::=)
cfauConf::=
(deviceSpecifier::=, formatSpec::=)
deviceConf::=
(deviceSpecifier::=, allocOperandList::=)
Syntax Element | Description |
---|---|
DB_UNIQUE_NAME db_unique_name {CLEAR | CONNECT IDENTIFIER ' connect_string ' } |
Specifies the net service name for the physical standby database specified by DB_UNIQUE_NAME . The CONNECT IDENTIFIER string must not include the database user name and password.
RMAN must also be connected to the primary database as When you run the Note: When the target database needs to connect to other standby or primary databases, it connects as the Suppose that you recently connected RMAN as Note: If the database specified by |
delalConf |
Configures an archived redo log deletion policy. |
AUXNAME FOR DATAFILE datafileSpec TO ' filename ' |
Configures the auxiliary file name for the specified target data file to ' filename ' (see Example 2-45). Specify CLEAR to unspecify the auxiliary file name.
If you are performing TSPITR or using For example, use this command during TSPITR if the data files are on raw disk and you must restore auxiliary data files to raw disk for performance reasons. Typically, you set the When renaming files with the See Also: Oracle Database Backup and Recovery User's Guide to learn how to perform RMAN TSPITR, and Oracle Database Backup and Recovery User's Guide to learn how to duplicate a database with RMAN |
backupConf |
Configures default backup options such as duplexing, optimization, excluding tablespaces, backup set sizes, and retention policies. |
cfauConf |
Configures control file autobackup settings. |
COMPRESSION ALGORITHM ' algorithm_name ' |
Specifies the algorithm that RMAN uses to create compressed backup sets.
The default compression algorithm setting is If, however, you have enabled the Oracle Database 11g Release 2 Advanced Compression Option, you can choose from the following compression levels:
Note: The compression ratio generally increases from LOW to HIGH, with a trade-off of potentially consuming more CPU resources. Since the performance of the various compression levels depends on the nature of the data in the database, network configuration, system resources and the type of computer system and its capabilities, Oracle cannot document universally applicable performance statistics. The decision about which level is best must factor in on how balanced your system is regarding bandwidth into the CPU as well as the actual speed of the CPU. It is highly recommended that you run tests with the different compression levels on the data in your environment. Choosing a compression level based on your environment, network traffic characteristics (workload) and data set is the only way to ensure that the backup set compression level can satisfy your organization's performance requirements and any applicable service level agreements. Note: The See Also: Oracle Database Reference entry for |
OPTIMIZE FOR LOAD
|
Specifies whether Oracle Database performs pre-compression block processing when compressed backups have been requested. TRUE is the default and FALSE enables pre-compression processing. The default behavior is not to perform pre-compression block processing. Such processing can consume extra CPU resources, and is not needed for blocks that contain all originally loaded data, and have never been the subject of single-row inserts and deletes. Specifying FALSE uses additional CPU resources to perform pre-compression block processing which consists of internal block cleanups and defragmentation that can result in improved levels of binary compression.
See Also: Oracle Database Backup and Recovery User's Guide to learn more about this option. |
AS OF RELEASE
'version' |
Specifies the release version. The version number uses the release number format and may use as many as 5 numbers to fully qualify the release. For example, 10.2.0.3.0 and 11.2 are acceptable values. This option ensures compression algorithm stability across future releases. |
deviceConf |
Configures default backup settings for devices, such as the default backup device, channel configurations for devices, default backup types for each device, and parallelism. |
ENCRYPTION |
Specifies transparent-mode encryption settings for the database or tablespaces.
This configuration applies unless overridden with the See Also: "Encryption of Backup Sets" to learn about the different modes of backup encryption, and Oracle Database Advanced Security Administrator's Guide to learn about transparent data encryption |
ALGORITHM ' algorithm_name ' |
Specifies the default algorithm to use for encryption when writing backup sets. Possible values are listed in V$RMAN_ENCRYPTION_ALGORITHMS . The CLEAR option resets the database to the default value. |
FOR DATABASE [ON | OFF | CLEAR] |
Specifies whether to enable transparent encryption for the entire database. The options are as follows:
Note: You must use the |
FOR TABLESPACE tablespace_name [ON | OFF | CLEAR] |
Specifies whether to enable transparent encryption for one or more tablespaces. Configured settings for a tablespace always override configuration set at the database level. The options are as follows:
Note: You must use the |
SNAPSHOT CONTROLFILE NAME TO ' filename ' |
Configures the snapshot control file name and location to ' filename ' . If you run CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR , then RMAN sets the snapshot control file name to its default.
The default value for the snapshot control file name is platform-specific and dependent on Oracle home. For example, the default on some UNIX systems is The snapshot control file name is valid for this database only. Assume that you configure the snapshot control file name to a nondefault value on the primary database. If you use See Also: Oracle Database Backup and Recovery User's Guide for more information about snapshot control files |
forDbUniqueNameOption |
Creates an RMAN configuration in the recovery catalog for the database in a Data Guard environment specified by DB_UNIQUE_NAME . You can specify a single database with db_unique_name or use ALL for all databases in the recovery catalog that share the DBID of the target database (or DBID specified by the SET DBID command).
A recovery catalog is required when performing operations in a Data Guard environment. RMAN must be connected as When you specify Note: It is possible to run |
This subclause manages persistent configurations for archived redo log deletion policy.
Syntax Element | Description |
---|---|
ARCHIVELOG DELETION POLICY |
Determines when archived redo log files are eligible for deletion.
The archived log deletion policy applies to all log archiving destinations, including the fast recovery area. The policy does not apply to archived redo log files in backup sets. Only archived redo log files in the fast recovery area are automatically deleted by the database. You can execute the In the recovery area, the database retains logs eligible for deletion as long as possible. The database deletes the oldest logs first when disk space is required. When the recovery area is under disk pressure, the database may delete archived redo log files needed by Oracle Streams. Note: The deletion policy does not apply to foreign archived redo log files, which are logs received by a logical standby database for a LogMiner session. These logs are transferred from a primary database, but unlike ordinary archived redo log files they have a different DBID. Foreign archived redo log files cannot be backed up or restored on a logical standby database. |
TO APPLIED ON [ALL] STANDBY |
Specifies that archived redo log files are eligible for deletion if both of the following conditions are met:
Which remote destinations are considered depends on the following criteria:
Note: It is invalid to specify the See Also: Oracle Data Guard Concepts and Administration for details |
BACKED UP integer TIMES TO DEVICE TYPE deviceSpecifier |
Specifies that archived redo log files are eligible for deletion if both of the following conditions are met:
If you configure the deletion policy with this clause, then a See Also: |
TO NONE |
Disables the archived log deletion policy. This is the default setting.
Archived redo log files can be located inside or outside of the fast recovery area. Logs in any location can be deleted by manual commands. Only logs in the fast recovery area can be deleted automatically by the database. When the deletion policy is set to
For example, suppose that archived redo log files have been transferred to required remote destinations. The logs are obsolete according to the recovery window retention policy, but have not been backed up. In this case, the logs are eligible for deletion. Alternatively, suppose that the logs are obsolete and have been backed up to SBT, but have not been transferred to required remote destinations. In this case, the logs are not eligible for deletion. If the deletion policy is set to |
TO SHIPPED TO [ALL] STANDBY |
Specifies that archived redo log files are eligible for deletion if both of the following conditions are met:
Which remote destinations are considered depends on the following criteria:
Note: It is invalid to specify the See Also: Oracle Data Guard Concepts and Administration for details |
This subclause manages persistent configurations relating to the BACKUP
command. One configuration is backup optimization. If you enable backup optimization, then RMAN does not back up a file to a device type if the identical file is already backed up on the device type.
Table 2-3 explains the criteria used by backup optimization to determine whether a file is identical and can potentially be skipped. The table also explains the algorithm that RMAN uses when backup optimization is enabled and it needs to determine whether to skip the backup of an identical file. If RMAN does not skip a backup, then it makes the backup exactly as specified.
Table 2-3 Backup Optimization Algorithm
Syntax Element | Description |
---|---|
{ARCHIVELOG | DATAFILE} BACKUP COPIES FOR DEVICE TYPE deviceSpecifier TO integer |
Specifies the number of copies of each backup set for DATAFILE (both data files and control files) or ARCHIVELOG files on the specified device type (see Example 2-42). You can create from 1 (default) to 4 copies.
RMAN can duplex backups to either disk or tape, but cannot duplex backups to tape and disk simultaneously. When backing up to tape, ensure that the number of copies does not exceed the number of available tape devices. Also, if Control file autobackups are never duplexed. Also, duplexing is not permitted in the fast recovery area. If duplexing is specified in the |
BACKUP OPTIMIZATION [ON | OFF | CLEAR] |
Toggles backup optimization ON or OFF (default). Specify CLEAR to return optimization to its default value of OFF .
Backup optimization is enabled when all of the following conditions are met:
Optimization prevents RMAN from backing up a file to a device type if the identical file is already backed up on the device type. RMAN does not signal an error if backup optimization causes all files to be skipped during a backup. The backup retention policy affects which files backup optimization skips. For two files to be identical, their content must be exactly the same, as described in Table 2-3. When you create backup pieces on disk or on media managed by Oracle Secure Backup, optimization excludes undo data from the backup when the data does not belong to an active transaction. Note: Note: You can override backup optimization with the See Also: Oracle Database Backup and Recovery User's Guide for a description of how RMAN determines that it can skip the backup of a file |
EXCLUDE FOR TABLESPACE tablespace_name [CLEAR] |
Excludes the specified tablespace from BACKUP DATABASE and RESTORE DATABASE commands (see Example 2-44). You cannot exclude the SYSTEM tablespace.
The BACKUP command default does not exclude tablespaces. You must declare the option to use it. The exclusion is stored as an attribute of the tablespace and not to the individual data files. In this manner, the exclusion applies not only to the present set of data files but also to any files that are added to this tablespace in the future. If you run You can still back up an excluded tablespace by explicitly specifying it in a |
MAXSETSIZE |
Specifies the maximum size of each backup set created on a channel. Use the CLEAR option to return MAXSETSIZE to the default value of UNLIMITED .
Note: This option is ignored by |
TO sizeSpec |
Specifies the maximum size of each backup set as integer gigabytes, kilobytes, or megabytes. |
TO UNLIMITED |
Specifies no size limit for backup sets. |
RETENTION POLICY |
Specifies a persistent, ongoing policy for backup sets and copies that RMAN marks as obsolete, that is, not needed and eligible for deletion.
As time passes, RMAN marks backup sets and copies as obsolete according to the criteria specified in the retention policy. RMAN automatically deletes obsolete backup sets and copies in the fast recovery area when space is needed. RMAN does not automatically delete obsolete files outside the fast recovery area: you must manually execute For backups, the basic unit of the retention policy is a backup set (not a backup piece) or image copy. For example, Note: Use the |
TO NONE |
Disables the retention policy feature. RMAN does not consider any backup sets or copies as obsolete. |
TO RECOVERY WINDOW OF integer DAYS |
Specifies a time window in which RMAN can recover the database.
The window stretches from the current time ( Note: The |
TO REDUNDANCY integer |
Specifies that RMAN should retain integer full or level 0 backups of each data file and control file. The default retention policy setting is REDUNDANCY 1 .
If more than The following scenario illustrates how redundancy works in an incremental backup strategy. Assume that the redundancy level is 1. You run a level 0 database backup at noon Monday, a level 1 cumulative backup at noon on Tuesday and Wednesday, and a level 0 backup at noon on Thursday. Immediately after each daily backup you run a Note: The |
This subclause creates persistent configurations relating to control file autobackups.
Syntax Element | Description |
---|---|
CONTROLFILE AUTOBACKUP |
Controls the control file autobackup feature.
Note: You should enable control file autobackup feature when using RMAN without a recovery catalog. |
ON |
Specifies that RMAN should perform a control file autobackup in the following circumstances:
The first channel allocated during the backup or copy job creates the autobackup and places it into its own backup set; for post-structural autobackups, the default disk channel makes the backup. RMAN writes the control file and server parameter file to the same backup piece. After the control file autobackup completes, the database writes a message containing the complete path of the backup piece and the device type to the alert log. The default location for the autobackup on disk is the fast recovery area (if configured) or a platform-specific location (if not configured). RMAN automatically backs up the current control file using the default format of You cannot configure RMAN to write the autobackup to multiple locations. To create multiple control file backups, you can make the last command in your backup job a Note: The
You can configure the autobackup format even when |
OFF |
Disables the autobackup feature (default).
Any |
CLEAR |
Returns this configuration to its default setting of OFF . |
FORMAT FOR DEVICE TYPE deviceSpecifier TO formatSpec |
Configures the default location and file name format for the control file autobackup on the specified device type (see Example 2-46).
By default, the format is If a fast recovery area is enabled, and if the format is the default The string The CONFIGURE CONTROLFILE AUTOBACKUP FOR DEVICE TYPE DISK TO '+dgroup1'; See Also: |
This subclause creates persistent configurations relating to channels and devices.
RMAN determines the names for configured channels. RMAN uses the following convention: ORA_
devicetype
_
n
, where devicetype
refers to the user device type (such as DISK
or sbt_tape
) and n
refers to the channel number. Channel names beginning with the ORA_
prefix are reserved by RMAN for its own use. You cannot manually allocate a channel with a name that begins with ORA_
.
Note:
Thesbt
and sbt_tape
device types are synonymous, but RMAN output always displays sbt_tape
whether the input is sbt
or sbt_tape
.RMAN names the first DISK
channel ORA_DISK_1
, the second ORA_DISK_2
, and so on. RMAN names the first sbt
channel ORA_SBT_TAPE_1
, the second ORA_SBT_TAPE_2
, and so on. When you parallelize channels, RMAN always allocates channels in numeric order, starting with 1 and ending with the parallelism setting (CONFIGURE DEVICE TYPE ... PARALLELISM
n
).
To run BACKUP
or jobs on specific configured channels, use the system-generated channel names. If you specify channel numbers in the CONFIGURE CHANNEL
command (see the deviceConf
clause), then RMAN uses the same numbers in the system-generated channel names.
Automatic channel allocation also applies to maintenance commands. If RMAN allocates an automatic maintenance channel, then it uses the same naming convention as any other automatically allocated channel.
Configured Channels in an Oracle RAC Environment
When using RMAN in an Oracle RAC environment, Oracle recommends that you specify a TARGET
connect string that establishes sessions on various instances in the cluster, depending on their load and availability.
Oracle does not recommend using the CONNECT
option to configure individual channels to connect to specific Oracle RAC instances, because they make your RMAN script dependent on the particular instances named in the channel configuration. If just one of those instances is unavailable, then your backup script fails to run. Using a load-balancing connect string makes your RMAN scripts both easier to code and more resilient to individual instance failures.
If you decide to use the CONNECT
option to direct RMAN channels to specific nodes, then Oracle strongly recommends that you not use passwords in your channel configuration. If the SYSDBA password for every instance is the same as the password in the TARGET
connection, you only need to configure your channels with CONNECT "@
nodename
"
. RMAN connects to that channel with the user ID and password from the TARGET
connection.
Syntax Element | Description |
---|---|
[AUXILIARY] CHANNEL [ integer ] DEVICE TYPE deviceSpecifier |
Specifies the standard or AUXILIARY channel that you are configuring or clearing, as well as the device type of the channel.
Note: Channels allocated with Either configure a generic channel or specify a channel number, where If You must specify at least one channel option. For example, you cannot issue a command such as 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 FORMAT 'bkup_%U'; The second command erases the Note: RMAN does not simultaneously allocate automatic channels for multiple device types in the See Also: Oracle Database Backup and Recovery User's Guide to learn how configure automatic channels specified by channel number |
allocOperandList |
Specifies control options for the configured channel.
If you configure channels by using the nondefault The CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '+dgroup1'; See Also: |
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. You cannot specify any other channel options (for example, PARMS ) when you specify CLEAR . |
DEFAULT DEVICE TYPE TO deviceSpecifier |
Specifies the default device type for automatic channels. By default, DISK is the default device type. CLEAR returns the default device type to DISK .
By default, the The |
DEVICE TYPE deviceSpecifier |
Specifies the device type (disk or sbt) to which to apply the settings specified in this CONFIGURE command. The CLEAR option resets backup type and parallelism settings for this device to their defaults.
If you run the CONFIGURE DEVICE TYPE sbt PARALLELISM 1; BACKUP DEVICE TYPE sbt DATABASE; In effect, RMAN does the following when executing this backup: RUN { ALLOCATE CHANNEL ORA_SBT_TAPE_1 DEVICE TYPE sbt; BACKUP DATABASE; } |
BACKUP TYPE TO [[COMPRESSED] BACKUPSET | COPY] |
Configures the default backup type for disk or tape backups. For SBT devices the COPY option is not supported. The default for disk is BACKUPSET .
If The default location for disk backups is the fast recovery area, if one is configured; otherwise, RMAN stores backups in a platform-specific location. The default format for backup file names is |
PARALLELISM integer |
Configures the number of automatic channels of the specified device type allocated for RMAN jobs. By default, PARALLELISM is set to 1 .
Note: The Suppose you set Note: If you configure To change the parallelism for a device type to CONFIGURE DEVICE TYPE sbt PARALLELISM 3; CONFIGURE DEVICE TYPE sbt PARALLELISM 2; |
Example 2-41 Configuring Device and Backup Options
This example configures channels of device type DISK
and sbt
and sets the default device type as sbt
. The example also enables backup optimization and configures a recovery windows of two weeks.
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/disk1/backups/%U'; CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=tape1)'; CONFIGURE DEFAULT DEVICE TYPE TO sbt; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
Example 2-42 Overriding the Default Device Type
This example configures duplexing to 2
for DISK
backups of data files and control files (control file autobackups on disk are a special case and are never duplexed), then configures sbt
as the default device.
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2; CONFIGURE CHANNEL DEVICE TYPE sbt PARMS 'ENV=(OB_DEVICE_1=tape1)'; CONFIGURE DEFAULT DEVICE TYPE TO sbt;
The first BACKUP
command backs up the archived redo log files on the default sbt
channel. The second BACKUP
command backs up the database to disk locations. Because duplexing is enabled for disk backups, two copies of each output backup set are created.
BACKUP ARCHIVELOG ALL; BACKUP DEVICE TYPE DISK DATABASE FORMAT '/disk1/db_backup_%U','/disk2/db_backup_%U';
Example 2-43 Configuring Automatic Channels Across File Systems
This example configures automatic disk channels across two file systems:
CONFIGURE DEVICE TYPE DISK PARALLELISM 2; CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/disk1/%U'; CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/disk2/%U';
Because PARALLELISM
is set to 2
, the following command divides the output data between two file systems:
BACKUP DEVICE TYPE DISK DATABASE PLUS ARCHIVELOG;
The following LIST
command shows how the data file backup was parallelized:
RMAN> LIST BACKUPSET 2031, 2032; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 2031 Full 401.99M DISK 00:00:57 19-JAN-07 BP Key: 2038 Status: AVAILABLE Compressed: NO Tag: TAG20070119T100532 Piece Name: /disk1/24i7ssnc_1_1 List of Datafiles in backup set 2031 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 973497 19-JAN-07 /disk3/oracle/dbs/t_db1.f 5 Full 973497 19-JAN-07 /disk3/oracle/dbs/tbs_112.f BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 2032 Full 133.29M DISK 00:00:57 19-JAN-07 BP Key: 2039 Status: AVAILABLE Compressed: NO Tag: TAG20070119T100532 Piece Name: /disk2/25i7ssnc_1_1 List of Datafiles in backup set 2032 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 2 Full 973501 19-JAN-07 /disk3/oracle/dbs/t_ax1.f 3 Full 973501 19-JAN-07 /disk3/oracle/dbs/t_undo1.f 4 Full 973501 19-JAN-07 /disk3/oracle/dbs/tbs_111.f
Example 2-44 Configuring Automatic Channels in an Oracle Real Application Clusters (Oracle RAC) Configuration
This example assumes an Oracle RAC database with two nodes. Oracle Secure Backup is the media manager. Tape drive tape1
is directly attached to node1
, while tape drive tape2
is directly attached to node2
. The example configures an automatic SBT channel for each cluster node.
This example illustrates channel connections to Oracle RAC instances node1
and node2
. For both channel connections, RMAN uses the same user name and password that were entered for the target database connection.
CONFIGURE DEVICE TYPE sbt PARALLELISM 2; CONFIGURE DEFAULT DEVICE TYPE TO sbt; CONFIGURE CHANNEL 1 DEVICE TYPE sbt CONNECT '@node1' PARMS 'ENV=(OB_DEVICE=tape1)'; CONFIGURE CHANNEL 2 DEVICE TYPE sbt CONNECT '@node2' PARMS 'ENV=(OB_DEVICE=tape2)';
Example 2-45 Configuring Auxiliary File Names
This example uses CONFIGURE AUXNAME
to specify new file names for the data files. The DUPLICATE
command duplicates a database to a remote host with a different directory structure.
# set auxiliary names for the data files CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f'; CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f'; CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f'; CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f'; RUN { ALLOCATE AUXILIARY CHANNEL dupdb1 TYPE DISK; DUPLICATE TARGET DATABASE TO dupdb LOGFILE GROUP 1 ('?/dbs/dupdb_log_1_1.f', '?/dbs/dupdb_log_1_2.f') SIZE 4M, GROUP 2 ('?/dbs/dupdb_log_2_1.f', '?/dbs/dupdb_log_2_2.f') SIZE 4M REUSE; } # Un-specify the auxiliary names for the data files so that they are not # overwritten by mistake: CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR; CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;
Example 2-46 Specifying the Default Format for Control File Autobackup
The following example enables the autobackup feature and configures the default autobackup format for the DISK
and sbt
devices:
CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/disk2/%F'; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE sbt TO 'cf_auto_%F';
Example 2-47 Creating Configurations for Standby Databases
Assume that primary database prod
is associated with two standby databases with the DB_UNIQUE_NAME
names dgprod3
and dgprod4
. Assume that you start RMAN and connect to prod
as TARGET
and connect to a recovery catalog. The following commands configure the default device type for databases dgprod3
and dgprod4
.
CONFIGURE DEFAULT DEVICE TYPE TO sbt FOR DB_UNIQUE_NAME dgprod3; CONFIGURE DEVICE TYPE sbt PARALLELISM 2 FOR DB_UNIQUE_NAME dgprod3; CONFIGURE DEFAULT DEVICE TYPE TO DISK FOR DB_UNIQUE_NAME dgprod4;
The control files of the two standby databases are updated with the configuration only after the reverse resynchronization from the recovery catalog to the control file, which occurs the first time that the user connects to dgprod3
and dgprod4
.
The following SHOW
command displays the persistent device type configurations for the database whose unique name is dgprod3
:
RMAN> SHOW DEVICE TYPE FOR DB_UNIQUE_NAME dgprod3; RMAN configuration parameters for database with db_unique_name DGPROD3 are: CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO BACKUPSET; CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
The following SHOW
command displays the persistent configurations for all databases known to the recovery catalog whose DBID is 3257174182 (the value specified by the preceding SET DBID
command):
SHOW ALL FOR DB_UNIQUE_NAME ALL;
Example 2-48 Optimizing Backups
This scenario illustrates the backup optimization behavior described in Table 2-3. Assume that backup optimization is disabled. At 9 a.m., you back up three copies of all existing archived redo log files to tape.
The BACKUP_TAPE_IO_SLAVES
initialization parameter must be true
when duplexing backups to tape.
BACKUP DEVICE TYPE sbt COPIES 3 ARCHIVELOG ALL;
At 11 a.m., you enable backup optimization:
CONFIGURE BACKUP OPTIMIZATION ON;
At noon, you run the following archived redo log backup:
BACKUP DEVICE TYPE sbt COPIES 2 ARCHIVELOG ALL; Starting backup at 19-JAN-07 current log archived using channel ORA_SBT_TAPE_1 skipping archived log file /d1/db1r_605ab325_1_34_612112605.arc; already backed up 3 time(s) skipping archived log file /d1/db1r_605ab325_1_35_612112605.arc; already backed up 3 time(s) skipping archived log file /d1/db1r_605ab325_1_36_612112605.arc; already backed up 3 time(s) skipping archived log file /d1/db1r_605ab325_1_37_612112605.arc; already backed up 3 time(s) skipping archived log file /d1/db1r_605ab325_1_38_612112605.arc; already backed up 3 time(s) skipping archived log file /d1/db1r_605ab325_1_39_612112605.arc; already backed up 3 time(s) channel ORA_SBT_TAPE_1: starting archived log backup set channel ORA_SBT_TAPE_1: specifying archived log(s) in backup set input archived log thread=1 sequence=40 RECID=170 STAMP=612270506 channel ORA_SBT_TAPE_1: starting piece 1 at 19-JAN-07 channel ORA_SBT_TAPE_1: finished piece 1 at 19-JAN-07 with 2 copies and tag TAG20070119T110827 piece handle=2hi7t0db_1_1 comment=API Version 2.0,MMS Version 10.1.0.0 piece handle=2hi7t0db_1_2 comment=API Version 2.0,MMS Version 10.1.0.0
In this case, the BACKUP
...
COPIES
setting overrides the CONFIGURE
...
COPIES
setting, so RMAN sets n
=2
. RMAN skips the backup of a log only if at least two copies of the log exist on the sbt
device. Because three copies of each log exist on sbt
of all the logs generated on or before 9 a.m., RMAN skips the backups of these logs. However, RMAN backs up two copies of all logs generated after 9 a.m. because these logs have not yet been backed up to tape.
Example 2-49 Configuring a Default Compression Algorithm
This example assumes that you have a license for the Advanced Compression Option (ACO) of the database.
If you want to make the MEDIUM
compression algorithm the default compression algorithm for all compressed backups, issue the following:
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM';
From this point on, you can use the MEDIUM
compression algorithm by issuing the following command:
BACKUP AS COMPRESSED BACKUPSET DATABASE;