See Also: Oracle Database SQL Reference for CREATE DATABASE syntax. Make sure that the archived redo logs are available in the expected location in the new host. You cannot use the DUPLICATE command to activate a standby database. Excludes the specified tablespace from the duplicate database. In this example, the NOFILENAMECHECK option is specified because the standby and primary datafiles and logs have the same names. Change), You are commenting using your Facebook account. Description of the illustration duplicate.gif, Description of the illustration dupoptionlist.gif, Description of the illustration dupsbyoptionlist.gif, Description of the illustration logspec.gif, Description of the illustration sizespec.gif, Oracle Database Backup and Recovery Advanced User's Guide, Oracle Data Guard Concepts and Administration, Specifies that database being duplicated is to be used as a standby database. Do not attempt to register the standby database in the primary database repository. For example, assume that you create the standby control file and then immediately afterward archive the current log, which has a sequence of 100. Note that the. The standby database is left mounted after duplication is complete. RMAN uses the parameter file at this location, which you must have previously created, to start the duplicated database. If duplicating a database on the same host as the target database, do not specify the NOFILENAMECHECKoption. You cannot recover the duplicate database to the current point in time, that is, the most recent SCN. If no valid backups exist of any tablespace or datafile, then the DUPLICATE command fails. 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. If a file in the specification list is not affected by the conversion parameter in DUPLICATE, then you must rename it by other means, such as SET NEWNAME. when duplicating a database to a different host, in which case RMAN recovers the duplicate database up to or before the most recent available archived log: it cannot recover into the online redo logs. Specifies the name of the duplicate database. Use this option only To specify different filenames for the tempfiles, see the discussion of SWITCH TEMPFILE .
You cannot use the same database name for the target and duplicate databases when the duplicate database resides in the same Oracle home as the target. Specifies that RMAN should recover the database after creating it. RMAN uses the channel configuration from the target for auxiliary channels in the following circumstances: You have not manually allocated auxiliary channels.
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. Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. If you specify an, Prevents RMAN from checking whether target datafiles sharing the same names as the duplicated files are in use. If you want the duplicate filenames to be the same as the target filenames, and if the databases are in different hosts, then you must specify NOFILENAMECHECK. When duplicating a database that is currently in NOARCHIVELOG mode, recovery occurs with the NOREDO option. You can leave a response, or trackback from your own site.
Specify new filenames or convert target filenames for the datafiles and online redo logs when the duplicate filenames must be different from the target filenames (as when duplicating to the same host as the primary). Specifies one or more patterns to map original to duplicate filenames. Because RMAN is not aware of the different hosts, RMAN cannot determine automatically that it should not check the filenames. A standby database does not get a new DBID. Note that if the duplicate database resides in a different Oracle home from the target, then its database name just has to differ from other database names in that same Oracle home. You cannot duplicate OFFLINE NORMAL tablespaces, although you can add these tablespaces manually after duplication. (LogOut/ You can achieve the same result by running, Specifies the online redo logs when creating a nonstandby duplicate database. Specifies the group containing the online redo log members. Note that this parameter overrides the initialization parameter DB_FILE_NAME_CONVERT (if it is set). If the target and duplicate databases share the same host, set all *_PATH and *_DEST initialization parameters appropriately so that the target database files are not overwritten by the duplicate database files. (LogOut/ If you do not specify SKIP TABLESPACE, then RMAN attempts to duplicate the following: All datafiles in online tablespaces, whether or not the datafiles are online. The user is responsible for determining that the duplicate operation will not overwrite useful data. Creating a Standby Database: ExampleThis example creates a standby database on a remote host with the same directory structure as the primary host. You can avoid this issue by using one of the other supported options for naming datafiles being duplicated from OMF: Use SET NEWNAME to specify names for individual datafiles. Tagged: RMAN. If you need to duplicate a database when some backups of the target database do not exist then you must specify SKIP TABLESPACE. Otherwise, you do not need to specify. Use DB_CREATE_FILE_DEST for any datafile names not specifically renamed by SET NEWNAME, and do not specify DB_FILE_NAME_CONVERT. When creating a standby or duplicate database and using Oracle Managed Files, tempfiles are re-created in the current DB_CREATE_FILE_DEST, either when the database is opened to become a primary, or when it is opened read-only. document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ). OReilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers. Note that an automatic auxiliary channel is already configured, so you do not need to manually allocate a channel: Scripting on this page enhances content navigation, but does not change the content in any way. must be executed from within the RUN command. RMAN automatically shuts down and restarts the auxiliary instance during duplication. The DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT initialization parameters cannot be used to control generation of new names for files at the duplicate which are Oracle Managed Files (OMF) at the target database. Fill in your details below or click an icon to log in: You are commenting using your WordPress.com account. If the target and duplicate databases reside on different hosts, then you must do one of the following tasks for duplication to be successful: Move backups and disk copies from the target host to the duplicate host to the same location as the target host so that the path names are identical. If you do not specify, 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. the same as those in the duplicate database. The target database cannot be a standby database. RMAN restores the most recent files, unless. Otherwise, RMAN may signal this error: This entry was posted on August 17, 2012 at 4:40 PM and is filed under Advanced. Causes RMAN not to check to see if the target database filenames are All tablespaces taken offline with an option other than NORMAL. In this case, specify the NOFILENAMECHECK option to avoid an error message. You cannot set the DB_NAME parameter in the duplicate parameter file to a value different from the database name specified in the DUPLICATE command. Oracle Database Backup and Recovery Advanced User's Guide to learn how to create a duplicate database with the DUPLICATE command, Oracle Data Guard Concepts and Administration to learn how to create, manage, and back up a standby database. Excludes datafiles in read-only tablespaces from the duplicate database. Because a duplicate database has a unique DBID, it is entirely independent of the primary database and can be registered in the same recovery catalog as the primary database. When not using Oracle Managed Files, DB_FILE_NAME_CONVERT is used to convert the tempfile names for the new database. Take OReilly with you and learn anywhere, anytime on your phone and tablet. If the target and duplicate databases reside on the same host, set the CONTROL_FILES parameter appropriately so that the DUPLICATE command does not generate an error because the target control file is in use. View all OReilly videos, Superstream events, and Meet the Expert sessions on your home TV. You can skip all tablespaces in the target database except the SYSTEM tablespace, undo tablespaces, and tablespaces containing rollback segments. If you do not specify filenames for duplicate online redo logs and datafiles, then RMAN reuses the target datafile names. Note that you cannot exclude the, Sets the end point for incomplete recovery of the duplicate database. When the standby or duplicate database is opened in read-only or read/write mode, Oracle automatically creates temporary files as needed, with the converted names based upon DB_FILE_NAME_CONVERT. You have not configured auxiliary channels. The DUPLICATE command does not require non-AUXILIARY channels (that is, normal target database channels). This option must be used if the location Get Oracle RMAN Pocket Reference now with the OReilly learning platform. If you want the duplicate filenames to be the same as the target filenames, and if the databases are in different hosts, then you must specify NOFILENAMECHECK. You cannot connect to the standby database and then DUPLICATE FOR STANDBY to create an additional standby database. its OK for the directory and filenames to be the same. Get Mark Richardss Software Architecture Patterns ebook to better understand how to design componentsand how they should interact. You cannot use SET NEWNAME or CONFIGURE AUXNAME to transform the filenames for the online redo logs on the standby database. Issue one or more ALLOCATE AUXILIARY CHANNEL commands before executing the DUPLICATE command, or CONFIGURE automatic auxiliary channels. Get full access to Oracle RMAN Pocket Reference and 60K+ other titles, with free 10-day trial of O'Reilly. RMAN does not check for completeness. There's also live online events, interactive content, certification prep materials, and more. For Oracle8i, this command Terms of service Privacy policy Editorial independence. Change). Do not use the LOG_FILE_NAME_CONVERT parameter. Typically, duplicate databases are used for testing. Note that backups of the standby database are interchangeable with backups of the primary database. Backups on tape must be accessible from the standby host. You must be connected to both the target database and auxiliary instance. Note: A record for the skipped read-only tablespace still appears in DBA_TABLESPACES. By using this feature, you can activate the read-only tablespace later.
The syntax is the same used in the. You can follow any responses to this entry through the RSS 2.0 feed. 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. Change), You are commenting using your Twitter account. For example, assume that you have a small database located in the /dbs directory of host1: Assume that you want to duplicate the database in machine host2, which has the same file system /oracle/dbs/*, and you want to use the same filenames in the duplicate database as in the primary. For example, you can store the read-only tablespace data on a CD-ROM, then mount the CD-ROM later and view the data. Duplication must be done to the same platform as the source datababse. To use backups (backup sets or image copies) of the target database to create either of the following: A duplicate database, which is a copy of the target database (or a subset of the target database) with a unique DBID. The supported options for naming online logs being duplicated from OMF are to use DB_CREATE_FILE_DEST, DB_RECOVERY_FILE_DEST or DB_CREATE_ONLINE_LOG_DEST_n. Refer to the description of logSpec for the legal options. For example, RMAN attempts to duplicate tablespaces taken offline with the IMMEDIATE option. To create additional standby databases, connect to the original primary database and run DUPLICATE FOR STANDBY. In this case, you must recover the standby database up to at least log sequence 100, or the database signals an ORA-1152 error message because the standby control file backup or copy was taken after the point in time. Specifies options that only apply when creating a standby database. Move backups and disk copies from the target host to the duplicate host to a new location (so that the path names are different), and then CATALOG them. Make sure that all backups and copies (disk or sbt) on the target host are remotely accessible from the duplicate host. 2022, OReilly Media, Inc. All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. (LogOut/ The auxiliary instance must be started with the NOMOUNT option, and the target database must be mounted or open. Specifies the location of the parameter file for the duplicated database.
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. Specifies options that apply when creating a duplicate database not intended for use as a standby database. You wish to name the duplicate files exactly like the target database files. To create a standby database with the DUPLICATE command you must specify the FOR STANDBY option. When using Oracle Managed Files at the target instance, it is not generally possible to generate valid OMF filenames for the duplicate instance by replacing a substring of the target instance OMF filename. If the file already exists, then the database verifies that its size matches the value of the. Otherwise, RMAN may signal this error: The following restrictions and notes apply when you use the DUPLICATE command with the FOR STANDBY option: All backups and copies located on disk must be available at the standby host with the same path names as in the target host. The target host and duplicate host have the same file structure. 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. If RMAN recovers the standby database, then the checkpoint SCN of the control file must be included in an archived redo log that is either available at the standby site or included in an RMAN backup. 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: Reusing the Target Filenames: ExampleThis example assumes the following: You are restoring to a new host without a catalog. Specifies the online redo logs when creating a nonstandby duplicate database. DUPLICATE to previous incarnations is not supported. 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. You do not want to duplicate read-only tablespaces. Setting New Filenames Manually: ExampleThis example assumes that the target datafiles are on host1 in directory /h1/oracle/dbs/trgt. of a target database. See Also: The description in dupOptionList. Allocates automatic channels for the specific. The automatic target channels do not have CONNECT strings. If archived logs have not been backed up, then archived logs must be available at the standby host with the same path names as in the target host. When duplicating Oracle Managed Files and storing the duplicates in an ASM disk group, RMAN uses DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT to convert the disk group name, and then generates a new, valid filename based on the converted disk group name. Hence, if incremental backups exist, RMAN applies only these backups to the restored files during recovery. A standby database, which is a special copy of the primary database that is updated by applying archived redo logs from the primary database. 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. If duplicating a database on the same host as the target database, do not specify the NOFILENAMECHECK option. You want to prevent RMAN from checking whether files on the target database that have the same names as the duplicated files are in use. These restrictions apply to all uses of the DUPLICATE command (both for creation of a standby database and creation of a nonstandby duplicate database): The target SCN for a DUPLICATE command cannot be before the most recent OPENRESETLOGS. You wish to duplicate the database to newdb on host2 in the directory /h2/oracle/oradata/newdb. Creates a duplicate database, or a standby database, from the backups Specifies how to convert original datafile names to new datafile names in the standby database.