Duplicate Database
Duplicate Database
You can use the RMAN DUPLICATE command to create a duplicate database from target
database backups while still retaining the original target database. The duplicate database can be
either identical to the original database or contain only a subset of the original tablespaces.
A RAC TARGET database can be duplicated as well. The procedure is the same as below. If the
auxiliary instance needs to be a RAC-database as well, than start the duplicate procedure for to a
single instance and convert the auxiliary to RAC after the duplicate has succeeded.
To prepare for database duplication, you must first create an auxiliary instance. For the
duplication to work, you must connect RMAN to both the target (primary) database and an
auxiliary instance started in NOMOUNT mode.
You must have at least one auxiliary channel allocated on the auxiliary instance. The principal
work of the duplication is performed by the auxiliary channel, which starts a server session on
the auxiliary host. This channel then restores the necessary backups of the primary database, uses
them to create the duplicate database, and initiates recovery.
1. Restores the target datafiles to the duplicate database and performs incomplete recovery
by using all available incremental backups and archived logs.
2. Shuts down and starts the auxiliary database.
3. Opens the duplicate database with the RESETLOGS option after incomplete recovery to
create the online redo logs.
4. Generates a new, unique DBID for the auxiliary database.
During duplication, RMAN must perform incomplete recovery because the online redo logs in
the target are not backed up and cannot be applied to the auxiliary database. The farest that
RMAN can go in recovery of the duplicate database is the most recent redo log archived by the
target database.
Register the auxiliary database in the same recovery catalog as the target database. This option is
possible because RMAN gives the duplicate database a new DBID during duplication.
The used instance name for the AUXILIARY instance, in this example, is AUX but can be any
other valid instance name.
Basic Steps
Perform these tasks before performing RMAN duplication:
Start RMAN with a connection to the target database, the auxiliary database, and (if you use one)
the recovery catalog database. You can start the RMAN executable on any host so long as it can
connect to all the instances.
Note: If the auxiliary instance requires a client-side initialization parameter file, then this file
must exist on the same host that runs the RMAN executable.
If automatic channels are not configured, then before issuing the DUPLICATE command,
manually allocate at least one auxiliary channel within the same RUN block. If the backups
reside on disk, then the more channels you allocate, the faster the duplication will be. For tape
backups, limit the number of channels to the number of devices available for the operation.
Posted by Jining at 8:35 AM