Saturday , November 25 2017
Home / Oracle DBA / How to perform RMAN cloning (Easy process to clone a database on different server)

How to perform RMAN cloning (Easy process to clone a database on different server)

Cloning is a process of making a separate copy from one database to another. Cloning is a different kind of operation to replicate and backup in the cloned environment it is fully functional and separate in its own right. Cloning is helpful for duplicating production databases which can be used for new application testing and enhancements. Cloning is also used to configure dataguard for creating standby databases. We can perform cloning manually and RMAN can also be used for cloning.

In the following example, there is one production database called METRO and the goal is to clone it to the different host with the name clonedb1. Now go through the following steps for cloning.

STEP 1: See that both the servers are getting pinged from each other. We have below two IP’s for our use:

Primary Database Name: Metro (

Clone Database Name: Clonedb1 (

STEP 2: Take full database backup and control file backup in primary database using RMAN.

STEP 3: Create same backup directory in clone database server and copy RMAN backup pieces from primary database server.

STEP 4: Create PFILE from SPFILE and copy it into cloned server to $ORACLE_HOME/dbs/ location.

STEP 5: Open initclonedb1.ora in cloned server and make following changes:

  1. Replace primary database name (i.e metro) with clone database name (i.e clonedb1)
  2. Add “db_file_name_convert” and “log_file_name_convert” parameters to pfile

Pfile looks like this before changes:

Pfile looks like this after changes:

STEP 6: Create all required directories in cloned server mentioned in pfile:

STEP 7: Create clonedb1 entry in /etc/oratab file.

STEP 8: Set oracle environment to “cloneddb1” as below:

STEP 9: Login to sqlplus and start up the database with nomount. This will start an auxiliary instance for clonedb1 database.

STEP 10: Connect RMAN in cloned server and follow below steps:

[oracle@localhost flash_recovery_area]$ rman

Recovery Manager: Release - Production on Wed Jul 12 22:01:09 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect auxiliary /

connected to auxiliary database: CLONEDB1 (not mounted)

RMAN> connect target sys/oracle@metro

connected to target database: METRO (DBID=2811244290)

RMAN> run

2> {

3> allocate auxiliary channel c1 device type disk;

4> allocate channel c2 device type disk;

5> duplicate target database to 'clonedb1';

6> }

=========================Cloning is Completed=========================

Validate clonedb1 database after cloning:

NOTE: You can see that the separate database “clonedb1” is created with READ/WRITE mode with its own database files.



Check Also

Step by Step process on how to configure Dataguard for Standby Database

Dataguard is used to create standby database for live production database which will be used …

Leave a Reply

Your email address will not be published. Required fields are marked *