Step by Step clone of an Oracle 11g using RMAN

September 16th, 2010 | Posted in Blog, clone oracle, duplicate database | 4 Comments


In this demonstration, we are going to duplicate the database, connecting to a target database and an auxiliary database.
Both databases are running in 11g release 2 version.

Test Environement:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
Information in this document applies to any platform.

Environment test details:

Operating system: Windows XP service pack 2
Database Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 (32 bit)
Source database name: ORAWI01
Clone database name: ORAWI2

Goal:

This document gives a step by step guide about how to clone an Oracle database to a different database using RMAN duplicate command.

Solution:

After setup of the listener and tnsnames.ora.

1- Test the connection of the source and auxiliary databases:


2- Create pfile for target database from source database :


3- Note the control files and Redolog files locations of both databases :


4- Add log_file_name_convert and db_file_name_convert for control files and log files new locations :

The following screen is showing the Pfile.ora file of the Source database :

The following screen is showing the new Pfile.ora file of the Auxiliary database :

5- Create the password file for the auxiliary ORAWI2 database:

6- Make sure that all the destination directories mentioned in the new pfile.ora exist in the auxiliary database. The following screen is showing the table SYS.TEST_DUP doesn`t exist in the auxiliary database. Bring the auxiliary database in nomount mode with the new pfile.ora.

7- make sure the primary, source database is running in ARCHIVELOG mode :

8- create a new table SYS.TEST_DUP in the source database for test and siwtch the logfiles:


9- Connect to RMAN target database and perform a backup :


10- Connect to the auxiliary database and perform the duplication :



11- Make sure that SUS:TEST_DUP exists in the auxiliary ORAWI2 database :



Conclusion :

The duplication of an 11g database is a straightforward process. You just make sure of adjusting and following some steps and you get your database duplicated efficiently.

Nice reading,
Wissem

Scridb filter


4 Comments to “Step by Step clone of an Oracle 11g using RMAN”

  1. krish says:

    Thanks for posting the material. I really appreciate if you can send this document to my mail id or repost it again because some screenshot are not properly aligned.

    Again thanks for your time and effort to post this tutorial.

    Also if you have tutorial for 11g (11.2.0.1) RAC & ASM cloning (prefer to be on Solaris 10, with screen shot) is highly appreciated.

    Thanks
    krish

  2. Paul says:

    Thanks so much for posting the steps. Please help, I have 2 questions after reading this.

    2- Create pfile for target database from source database :
    Is target database the axil. Database ? If so, screen shot seems to show creating pfile in ORAWI01 for ORAWI01 which is the source database.
    I do not understand how here the pfle is created for ORAWI2 from ORAWI01. Please explain.

    4- Add log_file_name_convert and db_file_name_convert for control files and log files new locations
    Screen shot does not show how. Could you please detail on how to add those in the pfile if that’s what you mean.

    Thank you.

  3. Md. Tanweer says:

    Thanks for posting the material.

    I really appreciate if you can send me, if you have tutorial for 11g (11.2.0.1) RAC & ASM (prefer to be on Linux, with screen shot) is highly appreciated.

    Thanks

  4. Mohammad says:

    paul,

    we create pfile from target database to source database and later we change database name, and location manually, to avoid writing /mistakes we directly copying file from source and changing the vlaue…


Leave a Comment





Subscribe


Polls

which oracle topic interests you most?

View Results

Loading ... Loading ...


Oracle Class Tweets


Recent Posts


Recent Comments

  • Jaspreet: Brilliant explanation.
  • Yousuf: Very Nice… Just wanted to check you have done all patching at Node 1 only.. is there any thing need to...
  • Yousuf: Very Nice.. Thanks for sharing.. Once question.. You have executed all commands on Node 1 only.. Is there any...
  • Emir: Thanks… Great article
  • borse firmate: Thank you for another informative blog. The place else may just I am getting that kind of information...
  • leandro: why this parameter is systemwide? could you read from a asm instance from one failure group and from the...
  • Mohammad: paul, we create pfile from target database to source database and later we change database name, and...
  • Muhammad Ikram: Thanks Brother for sharing pearls of knowledge. May ALLAH reward you for this both here and...
  • rgrover: Thanks for the POST. I recently encounter similar issue. Your POST helped.
  • gopalredy: really its very use full to dbas
  • Vivian: This is awesome! Thank you so much!
  • henry zhong: CDB=DB, and PDB=SCHEMA but in a sub dictionary?
  • Dehbashee: Salam Brother, Thanx for sharing, however, i would be interested in chaging the password for the grid user...
  • wissem: No we don’t need that :) Just the scripts I posted above
  • Md. Tanweer: Thanks for posting the material. I really appreciate if you can send me, if you have tutorial for 11g...
  • christiaan: Thanks!! This has been bugging the hell out of me for so long.
  • Rajasekhar: Thank you
  • Samarjit Panigrahy: Very Nice and Simple Demo… Cool :)
  • cq: Any reason not to use auto patch for both CRS and RAC homes with one command? Or use opatch auto for RAC home as...
  • Hitesh: Hi, Can we use this RACcheck tool on oracle SE version ? Thanks