Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-02 |
|
|
View PDF |
duplicate::=
Text description of dupOptionList
Text description of dupsbyOptionList
logSpec::=
sizeSpec::=
To use backups (backup sets or image copies) of the target database to create either of the following:
To create a standby database with the DUPLICATE
command you must specify the FOR
STANDBY
option. The DUPLICATE
...
FOR
STANDBY
command creates the standby database by restoring a standby control file, mounting the standby control file, and then restoring and recovering backups of the target datafiles. The standby database is left mounted after duplication is complete. Note that backups of the standby database are interchangeable with backups of the primary database.
When duplicating a database that is currently in NOARCHIVELOG
mode, recovery occurs with the NOREDO
option. Hence, if incremental backups exist, RMAN applies only these backups to the restored files during recovery. For databases in ARCHIVELOG
mode, DUPLICATE
recovers by default up to the last archived redo log generated at the time the command was executed, or until a time specified with a SET UNTIL
clause.
See Also:
Oracle Database Backup and Recovery Advanced User's Guide to learn how to create a duplicate database with the Oracle Data Guard Concepts and Administration to learn how to create, manage, and back up a standby database |
These restrictions apply to all uses of the DUPLICATE
command (both for creation of a standby database and creation of a nonstandby duplicate database):
ALLOCATE
AUXILIARY
CHANNEL
commands before executing the DUPLICATE
command, or CONFIGURE
automatic auxiliary channels. RMAN uses the automatic target channel configuration for auxiliary channels in the following circumstances:
CONNECT
strings.The DUPLICATE
command does not require non-AUXILIARY
channels (that is, normal target database channels).
NOMOUNT
option, and the target database must be mounted or open. The target database cannot be a standby database.SKIP
TABLESPACE
. If you do not specify SKIP
TABLESPACE
, then RMAN attempts to duplicate the following:
NORMAL
. For example, RMAN attempts to duplicate tablespaces taken offline with the IMMEDIATE
option. You cannot duplicate OFFLINE
NORMAL
tablespaces, although you can add these tablespaces manually after duplication.If no valid backups exist of any tablespace or datafile, then the DUPLICATE
command fails.
SYSTEM
tablespace, undo tablespaces, and tablespaces containing rollback segments. RMAN does not check for completeness. For example, you can duplicate a data tablespace but not the tablespace containing the index for the data, or duplicate a tablespace that contains only one partition of a partitioned table.CONTROL_FILES
parameter appropriately so that the DUPLICATE
command does not generate an error because the target control file is in use._PATH
and *_DEST
initialization parameters appropriately so that the target database files are not overwritten by the duplicate database files.DB_NAME
parameter in the duplicate parameter file to a value different from the database name specified in the DUPLICATE
command.CATALOG
them.sbt
) on the target host are remotely accessible from the duplicate host. Make sure that the archived redo logs are available in the expected location in the new host.NOFILENAMECHECK
.NOFILENAMECHECK
option. Otherwise, RMAN may signal this error:
RMAN-10035: exception raised in RPC: ORA-19504: failed to create file "/oracle/dbs/tbs_01.f" ORA-27086: skgfglk: unable to lock file - already in use SVR4 Error: 11: Resource temporarily unavailable Additional information: 8 RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
The following restrictions apply when you use the DUPLICATE
command with the FOR
STANDBY
option:
ORA-1152
error message because the standby control file backup or copy was taken after the point in time.SET NEWNAME
or CONFIGURE AUXNAME
to transform the filenames for the online redo logs on the standby database.DUPLICATE
command to activate a standby database.DUPLICATE
...
FOR
STANDBY
to create an additional standby database. To create additional standby databases, connect to the original primary database and run DUPLICATE
...
FOR
STANDBY
.Syntax Element | Description |
---|---|
|
Specifies that database being duplicated is to be used as a standby database. RMAN restores the most recent files, unless |
|
Specifies options that only apply when creating a standby database. |
Specifies that RMAN should recover the database after creating it. If you specify an |
|
Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. Note that the See Also: The description in |
|
|
Specifies the name of the duplicate database. The name should match the name in the initialization parameter file of the duplicate database or the database signals an error when creating the control file. |
Syntax Element | Description |
---|---|
|
Specifies options that apply when creating a duplicate database not intended for use as a standby database. |
|
Allocates automatic channels for the specific See Also: "deviceSpecifier" |
Specifies one or more patterns to map original to duplicate filenames. Note that this parameter overrides the initialization parameter See Also: "fileNameConversionSpec" |
|
Specifies the online redo logs when creating a nonstandby duplicate database. The syntax is the same used in the Refer to the description of |
|
Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. The user is responsible for determining that the duplicate operation will not overwrite useful data. This option is necessary when you are creating a duplicate database in a different host that has the same disk configuration, directory structure, and filenames as the host of the target database. For example, assume that you have a small database located in the /oracle/dbs/system_prod1.dbf /oracle/dbs/users_prod1.dbf /oracle/dbs/tools_prod1.dbf /oracle/dbs/rbs_prod1.dbf Assume that you want to duplicate the database in machine |
|
Enables a restricted session in the duplicate database by issuing the following SQL statement: |
|
Specifies a client-side initialization parameter used by the auxiliary instance. RMAN automatically shuts down and restarts the auxiliary instance during duplication. If the auxiliary does not use a server-side parameter file in the default location, you must specify the client-side parameter file that RMAN should use when starting the auxiliary instance. Otherwise, you do not need to specify |
|
Excludes datafiles in read-only tablespaces from the duplicate database. Note: A record for the skipped read-only tablespace still appears in |
|
Excludes the specified tablespace from the duplicate database. Note that you cannot exclude the |
|
Sets the end point for incomplete recovery of the duplicate database. You can achieve the same result by running See Also: "untilClause" |
Syntax Element | Description |
---|---|
|
Specifies the online redo logs when creating a nonstandby duplicate database. If you do not specify See Also: Oracle Database SQL Reference for |
Specifies the filename of the online redo log member and the size of the file in kilobytes ( |
|
Allows the database to reuse an existing file. If the file already exists, then the database verifies that its size matches the value of the |
|
Specifies the group containing the online redo log members. |
Syntax Element | Description |
---|---|
|
Specifies options that only apply when creating a standby database. |
Specifies that RMAN should recover the database after creating it. If you specify an |
|
Specifies how to convert original datafile names to new datafile names in the standby database. See Also:"fileNameConversionSpec" |
|
Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. Note that the See Also: The description in |
This example assumes that the target datafiles are on host1
in directory /h1/oracle/dbs/trgt
. You wish to duplicate the database to newdb
on host2
in the directory /h2/oracle/oradata/newdb
. The DUPLICATE
command uses backup sets stored on tape to duplicate the target database to database newdb
, and recovers it to a point 24 hours ago:
RUN { ALLOCATE AUXILIARY CHANNEL newdb1 DEVICE TYPE sbt; DUPLICATE TARGET DATABASE TO newdb DB_FILE_NAME_CONVERT=('/h1/oracle/dbs/trgt/','/h2/oracle/oradata/newdb/') UNTIL TIME 'SYSDATE-1' # specifies incomplete recovery SKIP TABLESPACE cmwlite, drsys, example # skip desired tablespaces PFILE = ?/dbs/initNEWDB.ora lOGFILE GROUP 1 ('?/oradata/newdb/redo01_1.f', '?/oradata/newdb/redo01_2.f') SIZE 200K, GROUP 2 ('?/oradata/newdb/redo02_1.f', '?/oradata/newdb/redo02_2.f') SIZE 200K GROUP 3 ('?/oradata/newdb/redo03_1.f', '?/oradata/newdb/redo03_2.f') SIZE 200K REUSE; }
This example assumes the following:
CONNECT TARGET CONNECT AUXILIARY SYS/aux_pwd@newdb DUPLICATE TARGET DATABASE TO ndbnewh LOGFILE '?/dbs/log_1.f' SIZE 200K, '?/dbs/log_2.f' SIZE 200K SKIP READONLY NOFILENAMECHECK;
This example creates a standby database on a remote host with the same directory structure as the primary host. In this example, the NOFILENAMECHECK
option is specified because the standby and primary datafiles and logs have the same names. Note that an automatic auxiliary channel is already configured, so you do not need to manually allocate a channel:
DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;