0% found this document useful (0 votes)
55 views

Duplicate Database

This document discusses using RMAN's DUPLICATE command to create a duplicate Oracle database from backups of the target database while retaining the original. It describes preparing an auxiliary instance for the duplication, including starting it in NOMOUNT mode and allocating auxiliary channels. The key steps of the duplication process are restoring backups to the auxiliary database, performing incomplete recovery, shutting down and restarting it, and generating a new DBID.

Uploaded by

stardanish9114
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Duplicate Database

This document discusses using RMAN's DUPLICATE command to create a duplicate Oracle database from backups of the target database while retaining the original. It describes preparing an auxiliary instance for the duplication, including starting it in NOMOUNT mode and allocating auxiliary channels. The key steps of the duplication process are restoring backups to the auxiliary database, performing incomplete recovery, shutting down and restarting it, and generating a new DBID.

Uploaded by

stardanish9114
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

RMAN 'Duplicate Database' Feature in Oracle9i / Oracle 10G

Based on Metalink Doc ID: Note:228257.1

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.

As part of the duplicating operation, RMAN manages the following:

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.

When duplicating a database, you can do the following:

1. Run the DUPLICATE command with or without a recovery catalog


2. Skip read-only tablespaces with the SKIP READONLY clause. Read-only tablespaces
are included by default. If you omit them, then you can add them later.
3. Exclude tablespaces from the auxiliary database with the SKIP TABLESPACE clause.
You cannot skip the SYSTEM tablespace or tablespaces containing rollback or undo
segments.
4. Create the auxiliary database in a new host. If the directory structure is the same on the
new host, then you can specify the NOFILENAMECHECK option and reuse the target
datafile filenames for the auxiliary datafiles.
5. Use the SET UNTIL command or DUPLICATE command with the UNTIL clause when
creating the auxiliary database to recover it to a noncurrent time. By default, the
DUPLICATE command creates the database by using the most recent backups of the
target database and then performs recovery to the most recent consistent point contained
in the incremental backups and archived logs.

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.

Preparing the Auxiliary Instance for 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:

Task 1: setenv ORACLE_SID AUX


Create an Oracle Password File for the Auxiliary Instance

Task 2: Ensure SQL*Net Connectivity to the Auxiliary Instance.


A SQL*Net connection to the Auxilary instance is not required, but recommended. As the setup
of the SQL*Net connection is easier done for the auxiliary instance than for the
TARGET.RMAN is connecting to the target and auxiliary instance with SYSDBA privileges. A
SQL*Net connection using SYSDBA privileges requires a password file.

Task 3: Create an Initialization Parameter File for the Auxiliary Instance


Mandatory initialization parameter settings for the auxiliary database:

Task 4: Start the Auxiliary Instance NOMOUNT

Task 5: Mount or Open the Target Database


Task 6: Make Sure You Have the Necessary Backups and Archived Redo Logs
Task 7: Allocate Auxiliary Channels if Automatic Channels Are Not Configured

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

You might also like