The procedure for restore and recovery of the auxiliary database differs depending on whether the auxiliary database is on the same host as the primary database. Allrightsreserved.
You are responsible for determining that the duplicate operation does not overwrite useful data. RMAN chooses a time based on when the online datafiles have been completely copied, so that the datafiles can be recovered to a consistent point in time. Refer to the duplicate::= diagram for the syntax. If the source database files are in the Oracle Managed Files (OMF) format, then you cannot use the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT initialization parameters or the fileNameConversionSpec clause to generate new OMF filenames for the duplicate database. Copyright 1996 - 2020 documentation was created as a support and Oracle training reference for use by our Specifies that no archived redo log files should not be applied when recovering a consistent backup in any of the following scenarios: Disables the ability for RMAN to automatically recover from a failed duplication operation. LOGFILE Tablespace users contains datafile /oracle/oradata/users01.dbf and tablespace tools contains datafile /fs2/tools01.dbf. You can then CONFIGURE the default device type to sbt for a standby database with the DB_UNIQUE_NAME of standby1: Assume all backups needed to create the standby database are on tape. Specifies the name of the source database, which is the database that you want to duplicate. new_database/'*.log_file_name_convert='/u01/oradata/test/','/ from
Note: If DB_FILE_NAME_CONVERT is specified on the DUPLICATE command, then its filename settings override competing settings specified by SPFILE SET.
For example, if you specify DB_FILE_NAME_CONVERT twice in the DUPLICATE command, both in the SPFILE clause and outside of the SPFILE clause, then the setting outside of the SPFILE clause takes precedence.
In this scenario, the source database does not use a server parameter file. If prod1 uses a server parameter file, then you can create an initialization parameter file on the destination host that contains only the DB_NAME parameter set to an arbitrary value. by querying the following views on the auxiliary database: sys@TEST> Assume that srchost and desthost cannot mount each other's file systems by any means such as NFS. Specifies options for creating a duplicate or standby database. If these parameters are set, RMAN directs duplicate database online redo log files to Oracle managed storage based on these parameter settings. If you specify an, Specifies one or more patterns to map source database filenames to duplicate database filenames (see, Specifies that the files for the duplicate database are provided directly from the source database and not from a backup of the source database (see, Specifies options for creating online redo logs when creating a duplicate database that is not a standby database (see. See Also: Oracle Database Backup and Recovery User's Guide to learn more about the automated recovery from a failed DUPLICATE operation. "Restoring and Recovering the Auxiliary Database on the Same Host". You cannot duplicate OFFLINE NORMAL tablespaces, although you can add these tablespaces manually after duplication. Copies the server parameter file from the source database to the duplicate database. The only exception to this restriction are Automatic Storage Management (ASM) OMF names where only the name of the disk group can be changed. Run the following script in SQL*Plus on the auxiliary database to ensure that all datafiles are named correctly. Oracle Database Backup and Recovery User's Guide, Oracle Data Guard Concepts and Administration, Oracle Database Advanced Security Administrator's Guide, Making Disk Backups Accessible to the Auxiliary Instance, Description of the illustration duplicate.gif, Description of the illustration dupoptionlist.gif, Description of the illustration setparameter.gif, Description of the illustration logspec.gif, Description of the illustration sizespec.gif, "Prerequisites Specific to Active Database Duplication", Example 2-77, "Using SET NEWNAME FOR DATAFILE and SET NEWNAME FOR TABLESPACE to Name Duplicate Files", Specifies the source database, which is the database you want to duplicate. The source database does not use a server parameter file, so you cannot use the SPFILE technique to specify names for the duplicate datafiles. directories, which are different than the production Assume that you want to duplicate source database prod using backups and do not want to connect RMAN as TARGET to this database because it is shut down for maintenance. examples. Table 2-6 Prerequisites for Three Modes of Backup-Based Duplication. Prerequisites Common to All Forms of Duplication. new_database/control03.ctl' For example, enter: Mount the auxiliary database, specifying the CLONE keyword: The CLONE keyword causes Oracle to take all datafiles offline automatically. /u03/oracle/new_database/redo01.log RMAN creates duplicate files from pre-existing RMAN backups and copies. Directory Structure. No connection to a recovery catalog, a connection to the target but the target database is not open. Backup-based duplication with a target connection. This clause can be used instead of TARGET DATABASE when RMAN is connected as TARGET to the source database. parameters in the duplicate database command. No connection to the target database or the recovery catalog. Use the DUPLICATE command to create a copy of a source database. These channels perform the work of the duplication on the auxiliary database instance. If a tablespace is currently read/write, but you use untilClause to duplicate the database to an SCN at which the tablespace was read-only, then RMAN does not include the tablespace in the duplicate database. For more information on how to do this with BACKUP LOCATION, review the options described in the section Making Disk Backups Accessible to the Auxiliary Instance in the Oracle Database Backup and Recovery User's Guide. FormsOracle All rights reserved by This technique requires making complete copies of the datafiles of the duplicate database. You can also use the NOREDO option when you do not want to apply archived redo log files to a consistent backup. RMAN automatically enforces the rule that the set of tablespaces must be self-contained and must not contain database objects owned by SYS. LOGFILE If DORECOVER is specified, then RMAN also recovers the database. When performing duplicate with a target connection, then you must specify the currently connected database and not use the INCARNATION subclause. Just You do not set DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT because you are specifying names for datafiles and online logs in the RUN command itself. If you want the duplicate database to contain all the passwords available on your source database, then use the PASSWORD FILE option. *.control_files='/u03/oracle/new_database/control01.ctl','/u03/ A standby database is not assigned a new DBID. You use DUPLICATE LOGFILE to specify names for the online redo log files in the duplicate database. You can redirect the database files to a different location on the destination than that of the source. strive to update our BC Oracle support information. Database Support Note: You must not exclude SYS-owned objects or tablespaces with rollback segments, nor tablespaces containing materialized views. Burleson feedback. However, you can specify previous incarnations if you are duplicating without a connection to a target database. This option is valid for duplication without a target or a recovery catalog connection. all control files, redo log files and data files on the different Database Support Specifies the filenames and groups for the online redo log files. Assume that you want to use RMAN backups to create a standby database on a remote host with the same directory structure as the source host. be created manually. When you execute DUPLICATE with FROM ACTIVE DATABASE, at least one normal target channel and at least one AUXILIARY channel are required. *.db_block_size=8192 RMAN uses all incremental backups, archived redo log backups, and archived redo log files to perform incomplete recovery and then opens the database with the RESETLOGS option to create the online redo logs. Copied from source database when FOR STANDBY specified; otherwise re-created, Restored from backups when FOR STANDBY specified or duplication without a connection to the target database; otherwise re-created, Copied from source database (unless excluded with a SKIP option), Restored from backups (unless excluded with a SKIP option), Re-created when FOR STANDBY specified and defined on primary database, Copied from source database, but only if needed for the duplication, Obtained from backups or cataloged copies, but only if needed for the duplication, Copied from source database (see SPFILE clause in dupOptionList), Restored from backup if SPFILE clause is specified (see dupOptionList), Copied by default for standby databases; for nonstandby databases, copied only if PASSWORD FILE option is specified, Backups and other files in fast recovery area. Note: If you specify the UNTIL clause for duplication, then the following restrictions apply: RMAN determines whether to use NOREDO based on the current state of the database. This clause is relevant when you use DUPLICATE TARGET DATABASE to duplicate an Oracle RAC database to a single-instance database. The following sample scripts creates the duplicate database. Using the set newname command with the duplicate When executing DUPLICATE on desthost, you must use the PFILE parameter to specify the location of the initialization parameter file. If not, then rename them manually as in the previous step. If you intend to create the duplicate database on the source host, then set the CONTROL_FILES initialization parameter appropriately so that the DUPLICATE command does not generate an error because the source control file is in use. RMAN. This subclause includes options that control aspects of duplication such as naming the files and determining an end point for the duplication. If you use active database duplication, then see the FROM ACTIVE DATABASE description in dupOptionList for usage notes. After the duplication is complete, you can clear the configured auxiliary names for the datafiles in the duplicate database, so that they are not overwritten by future operations. Duplicating Database to the Remote Host with Different
Specifies the backup location on disk where the backups and copies of the database to be duplicated have been placed. The first way will be explained under this subtopic. manually, i.e. This option is only required when a subset of tablespaces are being duplicated with the, Specifies a restore point for backup-based duplication, with the SCN at which the restore point was created as the upper, inclusive limit. If you have configured automatic target channels to use CONNECT strings, then RMAN attempts to replicate the channel allocation on the auxiliary instance. change location of files of the auxiliary database directly from You can make this backup accessible in the following ways: Use NFS to mount the backup on the destination host with the same name. Tips ----------------------------------------- Run the following SQL script on the auxiliary database to ensure that all datafiles are named correctly: If not, then rename the files manually as in the previous step. You want to duplicate the source database to dupdb on destination host desthost. Allocates automatic channels for the specified device only (for example, Specifies that RMAN should recover the standby database after creating it. RMAN can perform the duplication in any of the following supported modes: RMAN duplicates the files directly from either an open or mounted database. In backup-based duplication of databases with a connection to the target database and in NOARCHIVELOG mode, media recovery uses the NOREDO option. In this example, /backups contains backups from several databases, including more than two databases with the name PROD. The following examples assume the case in which you restore the auxiliary database to the same host as the primary database. The standby database is left mounted after duplication is complete. Deletes specified initialization parameters from the parameter file. Set DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST to the desired ASM disk groups on the standby host. Refer to, Replaces the first string with the second string in all matching initialization parameter values. servicesApplication Active database duplication uses the auxiliary service name to copy the source database over the network to the auxiliary instance on the destination host, whereas backup-based duplication uses pre-existing RMAN backups and copies. Unlike, Specifies the names of the tablespaces with undo segments. Run the following commands to CONFIGURE the default device type to sbt for a standby database that has the DB_UNIQUE_NAME of standby1 and the net service name sby1. The source and duplicate databases must be on the same platform. You can create the password file with a single password so you can start the auxiliary instance and enable the source database to connect to it. The prerequisites vary depending on the type of duplication. For example, assume that the auxiliary set consists of the following files: These files will occupy the same locations in the auxiliary host. Example 2-78 Using SET NEWNAME FOR DATAFILE to Name Oracle-Managed Files. making changes to the parameter file. Remote In our scenario, all datafiles and online redo logs are renamed by initialization parameters, so no manual renaming is necessary. db_file_name_convert parameter changes location of datafiles The default initialization parameter file location is in use on the standby database. Assume that the source database prod is on srchost and contains nine datafiles, which are spread out over multiple directories. -------------------------------------------------
You can use PASSWORD FILE to request that RMAN overwrite the existing password file with the password file from the source database. Specifies the database ID (DBID) of the source database. DB_FILE_NAME_CONVERT set on the DUPLICATE command overrides the initialization parameter DB_FILE_NAME_CONVERT (if set). Because the limit is inclusive, RMAN selects only files that it can use to duplicate a database up to, Sets the specified initialization parameters to the specified values (see. In this process, all steps will be the same as they were in the Catalog RMAN automatically uses the thread mapped to the specified instance. The source database and auxiliary instances must use the same SYSDBA password, which means that both instances must have password files. Otherwise, RMAN can potentially overwrite and corrupt the target database datafiles, tempfiles, or online logs. UNTIL clause must be specified in the current incarnation. LinuxMonitoringRemote supportRemote For example, assume that you have a small database located in the /dbs directory of srchost: Assume that you want to duplicate this database to desthost, which has the same file system /oracle/dbs/*, and you want to use the same filenames in the duplicate database as in the source database. Hence, you do not need to rename the auxiliary database datafiles. Oracle Database Backup and Recovery 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. '/u03/oradata/new_database/redo01.log' size 5m. This clause enables you to duplicate a database or tablespace. TuningEmergency You cannot recover the duplicate database to the current point in time, that is, the most recent SCN. Oracle PricesHelp database, on the auxiliary server should be created If duplicating a database on the same host as the source database, then ensure that NOFILENAMECHECK is not set. You do not need to configure auxiliary channels because RMAN uses the normal channels on the source host to copy the database files. Prerequisites Specific to Active Database Duplication. However, this is not the You decide to use the SET NEWNAME DATABASE command because you want all duplicate datafiles in the same directory on the destination host. Oracle