Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 


Oracle active database duplication

Oracle Database Tips by Donald BurlesonMay 23, 2015

Question:  What is the RMAN active database duplication (ADD) and how is active database duplication different for cloning a database using RMAN? Does active database duplication make traditional RMAN duplication obsolete?

Answer:  See here for the traditional steps to use RMAN to clone a database. With Oracle Database 11g active database duplication you don't need a current RMAN backup to duplicate your database, and you don't have to move copies of your backups to clone a database using RMAN.

For full details on using active database duplication, see the code download from the book Oracle Backup & Recovery.
 
The 11g new feature called active database duplication.  Note that active database duplication can occur on both the local box and over the network.
 
Prepare the Auxiliary Instance on the Remote Host

1 - Create the Oracle directory structures.
2 - Create the password file for the auxiliary instance.
3 - Configure SQL*Net for the auxiliary instance.
4 - Create the parameter file for the auxiliary instance.
5 - Start the auxiliary instance.

Create the Oracle Database Directory Structures
 
Before we can duplicate the database we will need to create the directory structures that the duplicated database.

These include the directories for the data files and others as required.  We assume you have already installed Oracle and are generally familiar with duplicating a database using RMAN. 
 
Create the Password File for the Auxiliary Instance

Active database duplication requires that the auxiliary instance have a password file.  This is because the source database will be connecting directly to the auxiliary database, requiring a password file. 
 
One other key is that you want to use the same SYSDBA password as the source database.  You will also see, later in this example, that we use the password file option of the duplicate command. 
 
This will cause the duplication process to move the password file from the source to the target database during the duplication process.
 
Configure SQL*Net for the Auxiliary Instance
 
RMAN cloning requires that RMAN be able to connect to the auxiliary database instance via Oracle Networking (SQL*Net).  Because of this we will need to use the Oracle Network Configuration Assistant to configure a SQL*Net database link to the auxiliary database instance. 

Note:  You will have to hard-code the instance information in your listener.ora file to be able to facilitate the connection between the target and auxiliary database.
 
Create the Parameter File for the Auxiliary Instance
 
There are different strategies for the creation of the parameter file when duplicating databases.

For example, the SPFILE technique, which only requires that we create an SPFILE for the auxiliary database with the database name set to some arbitrary value. 
 
Create the Parameter File for the Auxiliary Instance
 
During the duplicate process (and during an active database duplication), RMAN will create the sPFILE for the database being duplicated from a copy of the SPFILE for the source database. 

Parameters of the duplicate allow you to manipulate destination directories for the auxiliary/target database if this is required. 

***********************************************

Here is a checklist of the steps you need to use RMAN for active database duplication:

In this example we will assume the source database name to be called "pri" and the the target database, we are creating is to be called "aux" and the "sys" password for aux is "sys".  Here is the step-by-step checklist for active database duplication installation and configuration:

STEP 1) From the command prompt create a password file for the AUX database.

orapwd file=$ORACLE_HOME/dbs/orapwaux password=sys entries=5


STEP 2) Create a parameter file from the spfile for the AUX database. Ensure that the ORACLE_SID is set to the DB you want to clone (pri)

export ORACLE_SID=pri
sqlplus / AS sysdba

create pfile='/oracle/10.2.0.1.0/dbs/initaux.ora' from spfile;


STEP 3) Edit the file /oracle/10.2.0.1.0/dbs/initaux.ora; change all occurrences of "pri" to "aux".

Next change db_name and instance_name to aux.

Then add the following two lines to the parameter file:

This must match your directory structure of course.

db_file_name_convert=('/oracle/data/pri','/oracle/data/aux')
log_file_name_convert=('/oracle/data/pri','/oracle/data/aux')



STEP 4) create the following directories: Check where they are located in initaux.ora

mkdir udump arch bdump audit cdump

STEP 5) Edit tnsnames.ora and listener.ora files to add the AUX entry

STEP 6) Shutdown and startup the listener.ora. From the command prompt type the follow:

lsnrctl stop

lsnrctl start


STEP 7) From RMAN, type the following commands.

RMAN
CONNECT AUXILIARY SYS/SYS@GOLD_AUX
CONNECT TARGET SYS/SYS@GOLD_PRI
STARTUP CLONE NOMOUNT FORCE;
DUPLICATE TARGET DATABASE TO AUX;


STEP 8) Remove the following entries from initaux.ora

db_file_name_convert=('/oracle/data/pri','/oracle/data/aux')
log_file_name_convert=('/oracle/data/pri','/oracle/data/aux')


STEP 9) Login into "aux" DB and create and spfile

create spfile from pfile='/oracle/10.2.0.1.0/dbs/initaux.ora';

STEP 10) Register AUX database with catalog for backups

**********************************************

This video is from the book Oracle Backup & Recovery from Rampant Tech Press.

Cloning database without connecting to the target database and recovery catalog with RMAN
 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster