This discussion is archived
5 Replies Latest reply: Jul 2, 2009 6:44 AM by emre baransel RSS

How can we clone the Oracle database in new Oracle Home

421625 Newbie
Currently Being Moderated
Hi,

I would like to clone oracle database into new oracle home. How can we set it using OEM.
I am using 10g grid control. Target db is on solaris

Thanks
Naveen
  • 1. Re: How can we clone the Oracle database in new Oracle Home
    emre baransel Employee ACE
    Currently Being Moderated
    after logging into target database, under maintenance tab, data movement header; ther is "clone database" option. When you click on it; you'll see :

    Clone Database uses RMAN to duplicate a database from:
    -- An open database in ARCHIVELOG mode, or
    -- An open database in NOARCHIVELOG mode (restart required), or
    -- A saved working directory from previous cloning
    Clone Database performs the following operations:
    -- Backup each database file and store it in a working directory
    -- Transfer each backup file from source to destination host
    -- Restore each backup file to existing destination Oracle Home
    -- Recover the cloned database with saved archived log files
    -- Open the cloned database with resetlogs

    It seems to be for cloning to a different host, but i guess you can chose the same host for source and destination. (I've never used cloning on em by the way :))

    But firstly, you should create a new oracle home, you can simply copy your oracle home with a new name (cp -R /oracle/app/oracle/product/10.2.0 /oracle/app/oracle/product/10.2.0.new) or make a new installation.

    I suggest you to do this cloning with CLI. You should take a full backup with RMAN, copy the oracle home, create a new initNEWSID.ora file and nomount the database, restore (or simply copy) controlfiles, restore database (with set newname commands), recover database, open resetlogs.
  • 2. Re: How can we clone the Oracle database in new Oracle Home
    421625 Newbie
    Currently Being Moderated
    Hi baranse,

    As you said, I first clone the oracle home , using the OEM to a new location , on the same server.
    Some how the new oracle home is not getting recognized by the OEM. It is now show in the available O_H list ( show under Destination Oracle Home).

    I need further help. Please suggest

    Tlhanks
    Naveen
  • 3. Re: How can we clone the Oracle database in new Oracle Home
    emre baransel Employee ACE
    Currently Being Moderated
    Try adding a line about the new ORACLE_HOME in oratab file. oratab file is under /etc or /var/opt/oracle depending your environment. It's format is :
    $ORACLE_SID:$ORACLE_HOME:<N|Y>:
    So add a new line like:
    new_sid:new_oracle_home_directory:N

    Please, let me know if it works...
  • 4. Re: How can we clone the Oracle database in new Oracle Home
    421625 Newbie
    Currently Being Moderated
    Hi Baransel,

    This issue got resolved, after setting the .profile for the oracle s/w owner, correctly on Solaris box.

    Thanks for your suggestion.

    Naveen.
  • 5. Re: How can we clone the Oracle database in new Oracle Home
    emre baransel Employee ACE
    Currently Being Moderated
    yes, setting in the profile or adding in the oratab helps em to see that oracle home.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points