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?
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
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
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.
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
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
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
will have to hard-code the instance information in your listener.ora
file to be able to facilitate the connection between the target and
Create the Parameter File for
the Auxiliary Instance
There are different
strategies for the creation of the parameter file when duplicating
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
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
From the command
prompt create a password file for the AUX
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)
sqlplus / AS sysdba
STEP 3) Edit the file
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
STEP 4) create the following directories:
Check where they are located in initaux.ora
mkdir udump arch bdump audit cdump
5) Edit tnsnames.ora and listener.ora
files to add the AUX entry
6) Shutdown and startup the listener.ora. From
the command prompt type the follow:
From RMAN, type the following commands.
CONNECT AUXILIARY SYS/SYS@GOLD_AUX
CONNECT TARGET SYS/SYS@GOLD_PRI
CLONE NOMOUNT FORCE;
DATABASE TO AUX;
8) Remove the
following entries from initaux.ora
9) Login into "aux" DB and create and
create spfile from
10) Register AUX database with catalog
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
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
for 30% off directly from the publisher.