Step By Step Creating Oracle Duplicate Database 10g on Same Server Using RMAN Auxiliary Instance and RMAN Backup

Duplicating Target Database Using RMAN Auxiliary Instance on Oracle 10g


Creating Duplicate Database on the Same Server Using RMAN Backup.

We have Target Database name as ORCL

And we are creating a Auxiliary database with name as AUXDB 

Fig :- Backup-Based Duplication with a Target Connection
Image Source -

1.Take Whole Hot/Cold Backup of Target Database

RMAN> backup database plus archivelog;

2.Create Pfile from Target Database Spfile

SQL> create pfile='C:\ORACLE\PRODUCT\10.2.0\DB_1\Database\initauxdb.ora' from spfile;

3.Open pfile with notepad and replace (Ctrl + H) all orcl to auxdb

SQL> host notepad C:\ORACLE\PRODUCT\10.2.0\DB_1\Database\initauxdb.ora

4.On Windows Platform You need to Create a new Instance for auxdb which also creates an
password file for the same.

SQL> host oradim -new -sid auxdb -syspwd admin

5.Create All the folders in Oracle Folder Structures.

SQL> host mkdir C:\oracle\product\10.2.0\oradata\auxdb
SQL> host mkdir C:\oracle\product\10.2.0\flash_recovery_area\AUXDB
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\adump
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\bdump
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\cdump
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\dpdump
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\pfile
SQL> host mkdir C:\oracle\product\10.2.0\admin\auxdb\udump

6.Connect to auxdb and startup instance at nomount stage.

C:\set ORACLE_SID=auxdb
C:\sqlplus / as sysdba
SQL> startup nomount //Instance started with pfile
SQL> create spfile from pfile;
SQL> shut immediate
SQL> startup nomount //Instance started with spfile now

7.Now set these two parameters to convert your datafiles and logfile names.

SQL> show parameter convert
SQL> alter system set db_file_name_convert = 'orcl','auxdb' scope=spfile;
SQL> alter system set log_file_name_convert = 'orcl','auxdb' scope=spfile;
SQL> shut immediate
SQL> startup nomount

8.Now you need to connect Recovery Manager to start the duplicating (cloning) process.

C:\set ORACLE_SID=auxdb
C:\>rman auxiliary /
RMAN> connect target sys/admin@orcl
RMAN> run
allocate auxiliary channel ch1 device type disk;
allocate channel ch2 device type disk;
duplicate target database to auxdb;

9.If all steps are done correctly you will have a new database clone created successfully.

Thanks You - Saurabh Joshi


Popular posts from this blog

Oracle Architecture - Explained In Detailed - Administration I

Oracle Database SQL - Practise - Question - Scott Schema Examples

Step by Step - How to resolve redo log file corruption using ALTER DATABASE CLEAR UNARCHIVED LOGFILE command