{"id":796,"date":"2023-11-23T21:52:58","date_gmt":"2023-11-23T21:52:58","guid":{"rendered":"https:\/\/test.samplewebsitelink.com\/ordba\/?p=796"},"modified":"2023-11-23T21:53:00","modified_gmt":"2023-11-23T21:53:00","slug":"rman-duplicating-the-whole-database","status":"publish","type":"post","link":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/","title":{"rendered":"RMAN Duplicating The Whole Database"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Duplicating the Whole Database<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Use the DUPLICATE command to duplicate databases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To duplicate a database:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;a. Ensure that the prerequisites for the selected duplication technique are met.<br>&nbsp;&nbsp; &nbsp;b. Complete the required planning tasks before we begin database duplication.<br>&nbsp;&nbsp; &nbsp;c. Prepare the auxiliary instance that is used when creating the duplicate database.<br>&nbsp;&nbsp; &nbsp;d. Start RMAN and connect to required databases.&nbsp;<br>&nbsp;&nbsp; &nbsp;e. Depending on wer duplication technique, we may need to connect to one or more of the following:&nbsp;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1. target database,&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;2. auxiliary instance, or&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;3. recovery catalog.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;f. Place the source database in a proper state (if necessary).<br>&nbsp;&nbsp; &nbsp;g. (Optional) Configure RMAN channels to improve duplication performance. Channels perform the primary task of &nbsp;&nbsp; &nbsp; &nbsp; duplicating the database. .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Use the DUPLICATE command to duplicate the active source database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;When we perform active database duplication, the backup can be&nbsp;<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;a. encrypted or&nbsp;<br>&nbsp;&nbsp; &nbsp;b. compress the backup sets that are used to transfer files from the source database to the duplicate database. &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; Additionally, we can create backup sets on the source database in parallel by using multisection backups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Duplicating a Subset of the Source Database Tablespaces<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;we can duplicate specified tablespaces within a source database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;To duplicate some tablespaces in a database ensure that the prerequisites for the selected duplication technique are &nbsp;&nbsp; &nbsp;met.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Complete the required planning tasks before we begin database duplication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare the auxiliary instance that is used when creating the duplicate database.<br>Start RMAN and connect to required databases.&nbsp;<br>Depending on the duplication technique, we may need to connect to one or more of the following:&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;a. target database,&nbsp;<br>&nbsp;&nbsp; &nbsp;b. auxiliary instance, or&nbsp;<br>&nbsp;&nbsp; &nbsp;c. recovery catalog.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Place the source database in a proper state (if necessary).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;(Optional) Configure RMAN channels to improve duplication performance.&nbsp;<br>&nbsp;&nbsp; &nbsp;Channels perform the primary task of duplicating the database.<br>&nbsp;&nbsp; &nbsp;Run the DUPLICATE command with one or more of the options<br>&nbsp;&nbsp; &nbsp;Other factors that influence what tablespaces are copied include the OFFLINE NORMAL option.&nbsp;<br>&nbsp;&nbsp; &nbsp;When tablespaces are taken offline with the OFFLINE NORMAL option before duplication,&nbsp;<br>&nbsp;&nbsp; &nbsp;RMAN does not duplicate the associated data files, and issues DROP TABLESPACE statement for these tablespaces on the &nbsp;&nbsp; &nbsp;duplicate database.&nbsp;<br>&nbsp;&nbsp; &nbsp;Therefore, we do not have to specify options to exclude these tablespaces.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<br>&nbsp;&nbsp; &nbsp;RMAN does duplicate tablespaces that are taken offline with any other option besides NORMAL&nbsp;<br>&nbsp;&nbsp; &nbsp;(unless they are named in a SKIP TABLESPACE option).&nbsp;<br>&nbsp;&nbsp; &nbsp;Only OFFLINE NORMAL tablespaces are skipped automatically.&nbsp;<br>&nbsp;&nbsp; &nbsp;As with online tablespaces, RMAN requires a valid backup for these tablespaces when we use backup-based duplication.<br>Example<br>&nbsp;&nbsp; &nbsp;Excluding Read-Only Tablespaces<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This example shows how to skip read-only tablespaces during database duplication<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;DUPLICATE TARGET DATABASE TO dupdb<br>&nbsp;&nbsp; &nbsp;FROM ACTIVE DATABASE<br>&nbsp;&nbsp; &nbsp;SKIP READONLY;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Excluding Specified Tablespaces<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DUPLICATE TARGET DATABASE TO dupdb<br>FROM ACTIVE DATABASE<br>SKIP TABLESPACE tools;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Including Specified Tablespaces<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">we can use the TABLESPACE option to specify which tablespaces to include in the specified database. The remaining tablespaces are skipped. The duplicated subset of tablespaces must be self-contained. The resulting set of skipped tablespaces must not have undo segments or materialized views.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This example includes the users tablespace, which is assumed to be self-contained, and all other tablespaces are excluded, except for SYSTEM and SYSAUX tablespaces and tablespaces with undo segments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DUPLICATE TARGET DATABASE TO dupdb<br>FROM ACTIVE DATABASE TABLESPACE users;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Including Specified Tablespaces with Undo Segments<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This example performs backup-based duplication with a target connection, but without a recovery catalog connection. we want to specify a subset of tablespaces for duplication. If the target database is not open in this scenario, then RMAN has no way to obtain the names of the tablespaces with undo segments. Thus, we must specify the UNDO TABLESPACE option for these tablespaces. The users tablespace must be self-contained. The resulting set of skipped tablespaces must not have undo segments or materialized views.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DUPLICATE TARGET DATABASE TO dupdb TABLESPACE users UNDO TABLESPACE undotbs;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Duplicating an Oracle RAC Database<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The steps to duplicate an Oracle Real Application Clusters (Oracle RAC) database contain minor variations from the ones used to duplicate databases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that the prerequisites for the selected duplication technique are met.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prerequisites for Duplicating a Database.<br>Complete the required planning tasks before we begin database duplication.<br>Prepare the auxiliary instance that is used when creating the duplicate database.<br>While duplicating an Oracle Real Application Clusters (Oracle RAC) database,&nbsp;<br>set the CLUSTER_DATABASE initialization parameter on the auxiliary database to FALSE.&nbsp;<br>This parameter can be reset to TRUE after the duplication completes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start RMAN and connect to required databases. Depending on wer duplication technique, we may need to connect to one or more of the following:&nbsp;<br>&nbsp;&nbsp; &nbsp;1. target database,&nbsp;<br>&nbsp;&nbsp; &nbsp;2. auxiliary instance, or&nbsp;<br>&nbsp;&nbsp; &nbsp;3. recovery catalog.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Place the source database in a proper state (if necessary).<br>(Optional) Configure RMAN channels to improve duplication performance.&nbsp;<br>Channels perform the primary task of duplicating the database.<br>Use the DUPLICATE command to duplicate the source database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more information about duplicating an Oracle RAC database, refer to My Oracle Support Note 1617946.1 at https:\/\/support.oracle.com\/rs?type=doc&amp;id=1617946.1<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. Duplicating Sparse Databases<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The duplication process for a sparse database begins with an implicit restore and then completes duplicating the database containing sparse data files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that the backing file of the sparse data file is available for duplication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Active database duplication is not allowed for sparse databases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To duplicate a sparse database:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that the prerequisites for the selected duplication technique are met.<br>Complete the required planning tasks before we begin database duplication.<br>Prepare the auxiliary instance that is used when creating the duplicate database.<br>While duplicating an Oracle Real Application Clusters (Oracle RAC) database, set the CLUSTER_DATABASE initialization parameter on the auxiliary database to FALSE. This parameter can be reset to TRUE after the duplication completes.<br>Start RMAN and connect to required databases. Depending on wer duplication technique, we may need to connect to one or more of the following:&nbsp;<br>&nbsp;&nbsp; &nbsp;1. target database,&nbsp;<br>&nbsp;&nbsp; &nbsp;2. auxiliary instance, or&nbsp;<br>&nbsp;&nbsp; &nbsp;3. recovery catalog.<br>Place the source database in a proper state (if necessary).<br>(Optional) Configure RMAN channels to improve duplication performance. Channels perform the primary task of duplicating the database.<br>Run the DUPLICATE command for the sparse database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following command duplicates the sparse database db1 :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DUPLICATE FROM SPARSE DATABASE &#8216;DB1&#8217; TO &#8216;DUP1&#8217;;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The base (read-only) data files in a sparse database are not encrypted.&nbsp;<br>Ensure that the base data files are stored in a protected storage and accessed using secured communications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">6. Configuring RMAN Channels for Use in Duplication<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The primary job of database duplication is performed by RMAN channels. Each channel corresponds to an Oracle Database server session that performs the duplication tasks. Depending on the duplication technique, RMAN uses either auxiliary channels or target channels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use one of the following methods to configure channels:<br>Automatically allocate channels by using the CONFIGURE command<br>Manually allocate channels by using the ALLOCATE command<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;no automatic channels are configured,&nbsp;<br>then&nbsp;<br>&nbsp;&nbsp; &nbsp;we can manually ALLOCATE at least one channel before we being the duplication.<br>end&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ALLOCATE command that allocates channels must be in the same RUN block as the DUPLICATE command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RMAN can use the same channel configurations on the source database for duplication on the destination host even if the source database channels do not specify the AUXILIARY option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">7. Configuring Channels for Backup-based Duplication<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For backup-based duplication, the principal work of the duplication is performed by the auxiliary channels.&nbsp;<br>An auxiliary channel corresponds to a server session on the auxiliary instance on the destination host.&nbsp;<br>RMAN uses the channels to restore backups in the auxiliary instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configure additional auxiliary channels to improve the performance of the duplicate operation.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;we do not explicitly configure auxiliary channels,&nbsp;<br>then&nbsp;<br>&nbsp;&nbsp; &nbsp;RMAN uses the same channel configurations on the source database for duplication on the destination host.&nbsp;<br>end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RMAN can use these configurations even if the source database channels do not specify the AUXILIARY option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note the following additional considerations:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;a. With disk-based backups, we can increase the speed of the duplication operation by allocating additional channels.<br>&nbsp;&nbsp; &nbsp;b. With tape-based duplication, we can allocate only as many channels as the number of tape devices that are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The channel type (DISK or sbt) of the auxiliary channel must match the backup media. In general, the more channels we allocate for disk backups, the faster the duplication.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Important<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We cannot increase the speed of duplication after the disks reach their maximum read\/write rate.&nbsp;<br>For tape backups, limit the number of channels to the number of devices that are available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>If &nbsp;&nbsp; &nbsp;the auxiliary channels need special parameters (for example, to point to a different media manager)&nbsp;<br>then&nbsp;<br>&nbsp;&nbsp; &nbsp;we can configure an automatic channel with the AUXILIARY option of the CONFIGURE command.<br>end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Limitation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;a. When we perform duplication without a target connection and without a recovery catalog, only disk channels can be &nbsp;&nbsp; &nbsp; &nbsp; used.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;no user-allocated channels are used,&nbsp;<br>then &nbsp;&nbsp; &nbsp;only one channel initially restores the control file.&nbsp;<br>end<br>&nbsp;&nbsp; &nbsp;After the control file is mounted, the number of allocated channels depends on the configuration in the restored &nbsp;&nbsp; &nbsp;control file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;If &nbsp;&nbsp; &nbsp;(<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;we omit the USING BACKUPSET clause from the DUPLICATE command&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;and&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;the number of allocated auxiliary channels &gt;= to the number of target channels,&nbsp;<br>&nbsp;&nbsp; &nbsp;then&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;RMAN still uses active database duplication with backup sets.<br>&nbsp;&nbsp; &nbsp;end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp; &nbsp;If &nbsp;&nbsp; &nbsp;the auxiliary channels cannot access backups of the required data files and archived redo log files,&nbsp;<br>&nbsp;&nbsp; &nbsp;then&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;the duplication fails.<br>&nbsp;&nbsp; &nbsp;end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example Configuring Auxiliary Channels for Disk-based Backups<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following example allocates three auxiliary channels to duplicate a database to disk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">run<br>{<br>ALLOCATE AUXILIARY CHANNEL c1 DEVICE TYPE disk;<br>ALLOCATE AUXILIARY CHANNEL c2 DEVICE TYPE disk;<br>ALLOCATE AUXILIARY CHANNEL c3 DEVICE TYPE disk;<br>. . .<br>DUPLICATE DATABASE . . . ;<br>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring Channels for Active Database Duplication<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With active database duplication, we need not change the source database channel configuration or configure auxiliary channels.&nbsp;<br>However, we may want to increase the PARALLELISM setting of the source database disk channels so that RMAN copies files over the network in parallel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The type of active database duplication technique used determines which channels perform the principal work of duplication.&nbsp;<br>When image copies are used to perform active database duplication, the primary work is performed by the target channels.&nbsp;<br>Configure multiple target channels on the source database to improve the duplication performance. When active database duplication is performed by using backup sets, the principal work of duplication is performed by the auxiliary channels. Therefore, it is recommended that we allocate additional auxiliary channels. The number of auxiliary channels must be greater than or equal to the number of target channels. Using backup sets for active duplication also enables parallelism, which can improve the speed of the duplication process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">8. Placing the Source Database in a Proper State<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;RMAN is connected to the source database as TARGET,&nbsp;<br>then &nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;the source database must be in a proper state for duplication.<br>end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:<br>If &nbsp;&nbsp; &nbsp;we are performing backup-based duplication without a target connection,&nbsp;<br>then&nbsp;<br>&nbsp;&nbsp; &nbsp;skip to Starting RMAN and Connecting to Databases.<br>end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure that the source database is in a proper state:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;the source database instance is not mounted or open,&nbsp;<br>then&nbsp;<br>&nbsp;&nbsp; &nbsp;mount or open it.<br>end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If &nbsp;&nbsp; &nbsp;we are performing active database duplication,&nbsp;<br>then &nbsp;&nbsp; &nbsp;ensure that the following additional requirements are met:<br>&nbsp;&nbsp; &nbsp;If &nbsp;&nbsp; &nbsp;the source database is open,&nbsp;<br>&nbsp;&nbsp; &nbsp;then&nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;archiving must be enabled.<br>&nbsp;&nbsp; &nbsp;end<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;If &nbsp;&nbsp; &nbsp;the source database is not open,&nbsp;<br>&nbsp;&nbsp; &nbsp;then &nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;the database does not require instance recovery.<br>&nbsp;&nbsp; &nbsp;end<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">9. Starting RMAN and Connecting to Databases<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">we must start the RMAN client and connect to the database instances as required by the chosen duplication technique. The RMAN client can be located on any host so long as it can connect to the necessary databases over the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To start RMAN and connect to the target and auxiliary instances:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the RMAN client on any host that can connect to the necessary database instances.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, enter the following command at the operating system prompt on the destination host:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rman<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the RMAN prompt, run CONNECT commands for the database instances that are required for wer duplication technique.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:When we duplicate a whole CDB or one or more PDBs, connect to the root of both instances.<br>For active database duplication using image copies, we must connect to the source database as TARGET and to the auxiliary instance as AUXILIARY. we must supply the net service name to connect to the AUXILIARY instance. A recovery catalog connection is optional. On both instances, the password for the user performing the duplication must be the same. Any user with a SYSDBA or SYSBACKUP privilege can perform duplication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For active database duplication using backup sets, we must connect to the source database as TARGET by using a net service name. The auxiliary instance uses this net service name to connect to the source database and retrieve the backup sets that are required for the duplication. Connect to the auxiliary instance as AUXILIARY. If we are connecting to the auxiliary instance remotely or intend to use the PASSWORD FILE option of the DUPLICATE command, then connect to the auxiliary instance with a net service name. On both instances, the password for the user performing the duplication must be the same. Any user with a SYSDBA or SYSBACKUP privilege can perform duplication. A recovery catalog connection is optional.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For backup-based duplication without a target connection, we must connect to the auxiliary instance as AUXILIARY and the recovery catalog as CATALOG.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For backup-based duplication with a target connection, we must connect to the source database as TARGET and the auxiliary instance as AUXILIARY. A recovery catalog is optional.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For backup-based duplication without target and recovery catalog connections, we must connect to the auxiliary instance as AUXILIARY.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note:we cannot connect as TARGET to a standby database.<br>Example: Connecting to the Required Databases When Performing Active Database Duplication<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, a connection is established to the source database and the auxiliary instance using net service names. The Net Service name of the source database is srcdb and that of the auxiliary instance is dupdb.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To connect to required databases from the destination host:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the RMAN client on the destination host.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">rman<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Connect to the source database as TARGET.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RMAN&gt; CONNECT TARGET sys@srcdb;<br>RMAN&gt; CONNECT AUXILIARY sys@dupdb;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter the password for the SYS user on the auxiliary instance when prompted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">10. Using the DUPLICATE Command to Duplicate Databases<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RMAN provides multiple options for duplicating databases by using the DUPLICATE command.<br>Use one of the following options of the DUPLICATE command:<br>DUPLICATE DATABASE or DUPLICATE&#8230;ACTIVE DATABASE<br>Use these for duplicating non-CDBs and CDBs.<br>DUPLICATE DATABASE &#8230; FOR STANDBY<br>Use this to create a standby database by duplicating the source database.<br>Use the DUPLICATE DATABASE &#8230; FOR FARSYNC command to create an Oracle Data Guard far sync instance using duplication.<br>DUPLICATE PLUGGABLE DATABASE<br>Use this to duplicate one or more PDBs while connected to the root.<br>When we use the SET NEWNAME command to specify alternate names for duplicate database files, ensure that we enclose the DUPLICATE command and the SET NEWNAME commands within a RUN block.<br>The DUPLICATE command in Oracle Database Backup and Recovery Reference for additional examples on duplication<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Duplicating the Whole Database 1. Use the DUPLICATE command to duplicate databases. To duplicate a database: &nbsp;&nbsp; &nbsp;a. Ensure that the prerequisites for the selected duplication technique are met.&nbsp;&nbsp; &nbsp;b. Complete the required planning tasks before we begin database duplication.&nbsp;&nbsp; &nbsp;c. Prepare the auxiliary instance that is used when creating the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\"> <span class=\"screen-reader-text\">RMAN Duplicating The Whole Database<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[],"class_list":["post-796","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rman-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RMAN Duplicating The Whole Database - Ordba<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RMAN Duplicating The Whole Database - Ordba\" \/>\n<meta property=\"og:description\" content=\"&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Duplicating the Whole Database 1. Use the DUPLICATE command to duplicate databases. To duplicate a database: &nbsp;&nbsp; &nbsp;a. Ensure that the prerequisites for the selected duplication technique are met.&nbsp;&nbsp; &nbsp;b. Complete the required planning tasks before we begin database duplication.&nbsp;&nbsp; &nbsp;c. Prepare the auxiliary instance that is used when creating the &hellip; RMAN Duplicating The Whole Database Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Ordba\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-23T21:52:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-23T21:53:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/test.samplewebsitelink.com\/ordba\/wp-content\/uploads\/2023\/11\/rmantutorials.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"877\" \/>\n\t<meta property=\"og:image:height\" content=\"466\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"ordba\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ordba\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\",\"url\":\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\",\"name\":\"RMAN Duplicating The Whole Database - Ordba\",\"isPartOf\":{\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/#website\"},\"datePublished\":\"2023-11-23T21:52:58+00:00\",\"dateModified\":\"2023-11-23T21:53:00+00:00\",\"author\":{\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/7365beabb32b7aa77cf0e890ee90ea0f\"},\"breadcrumb\":{\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/test.samplewebsitelink.com\/ordba\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RMAN Duplicating The Whole Database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/#website\",\"url\":\"https:\/\/test.samplewebsitelink.com\/ordba\/\",\"name\":\"Ordba\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/test.samplewebsitelink.com\/ordba\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/7365beabb32b7aa77cf0e890ee90ea0f\",\"name\":\"ordba\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dd4335bb4e225c36ce7c56a0aff84bb202ebb523ebdc5d1e1a11cc3f3e6085f3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dd4335bb4e225c36ce7c56a0aff84bb202ebb523ebdc5d1e1a11cc3f3e6085f3?s=96&d=mm&r=g\",\"caption\":\"ordba\"},\"sameAs\":[\"https:\/\/test.samplewebsitelink.com\/ordba\"],\"url\":\"https:\/\/test.samplewebsitelink.com\/ordba\/author\/ordba\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RMAN Duplicating The Whole Database - Ordba","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/","og_locale":"en_US","og_type":"article","og_title":"RMAN Duplicating The Whole Database - Ordba","og_description":"&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Duplicating the Whole Database 1. Use the DUPLICATE command to duplicate databases. To duplicate a database: &nbsp;&nbsp; &nbsp;a. Ensure that the prerequisites for the selected duplication technique are met.&nbsp;&nbsp; &nbsp;b. Complete the required planning tasks before we begin database duplication.&nbsp;&nbsp; &nbsp;c. Prepare the auxiliary instance that is used when creating the &hellip; RMAN Duplicating The Whole Database Read More &raquo;","og_url":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/","og_site_name":"Ordba","article_published_time":"2023-11-23T21:52:58+00:00","article_modified_time":"2023-11-23T21:53:00+00:00","og_image":[{"width":877,"height":466,"url":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-content\/uploads\/2023\/11\/rmantutorials.jpg","type":"image\/jpeg"}],"author":"ordba","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ordba","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/","url":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/","name":"RMAN Duplicating The Whole Database - Ordba","isPartOf":{"@id":"https:\/\/test.samplewebsitelink.com\/ordba\/#website"},"datePublished":"2023-11-23T21:52:58+00:00","dateModified":"2023-11-23T21:53:00+00:00","author":{"@id":"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/7365beabb32b7aa77cf0e890ee90ea0f"},"breadcrumb":{"@id":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/test.samplewebsitelink.com\/ordba\/2023\/11\/23\/rman-duplicating-the-whole-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/test.samplewebsitelink.com\/ordba\/"},{"@type":"ListItem","position":2,"name":"RMAN Duplicating The Whole Database"}]},{"@type":"WebSite","@id":"https:\/\/test.samplewebsitelink.com\/ordba\/#website","url":"https:\/\/test.samplewebsitelink.com\/ordba\/","name":"Ordba","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/test.samplewebsitelink.com\/ordba\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/7365beabb32b7aa77cf0e890ee90ea0f","name":"ordba","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/test.samplewebsitelink.com\/ordba\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dd4335bb4e225c36ce7c56a0aff84bb202ebb523ebdc5d1e1a11cc3f3e6085f3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd4335bb4e225c36ce7c56a0aff84bb202ebb523ebdc5d1e1a11cc3f3e6085f3?s=96&d=mm&r=g","caption":"ordba"},"sameAs":["https:\/\/test.samplewebsitelink.com\/ordba"],"url":"https:\/\/test.samplewebsitelink.com\/ordba\/author\/ordba\/"}]}},"_links":{"self":[{"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/posts\/796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":1,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":797,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/posts\/796\/revisions\/797"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/media\/415"}],"wp:attachment":[{"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/test.samplewebsitelink.com\/ordba\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}