Archive for ‘Clone’

July 12, 2011

Clone Oracle Home – move to a new location

The most efficient way to create/duplicate/move oracle software is to clone an existing Oracle Home with all applied patch inside. Oracle provide a Perl script as $ORACLE_HOME/clone/bin/clone.pl. It accepts ORACLE HOME and ORACLE HOME NAME as parameters.

Demo:

Current Oracle Home: /u01/app/oracle/db

New Oracle Home: /app/oracle/db

1) Package current ORACLE_HOME as ‘oracle’ user

$> cd /u01/app/oracle/db

$> tar cvf orahome.tar *

2) Extract the package to new ORACLE_HOME

$> cd /app/oracle/db

$> tar xvf orahome.tar

3) Call clone.pl script to clone a new ORACLE HOME


$> export ORACLE_BASE=/app/oracle

$> export ORACLE_HOME=/app/oracle/db

$> export PATH=${ORACLE_HOME}/bin:$PATH

$> perl ${ORACLE_HOME}/clone/bin/clone.pl ORACLE_HOME=/app/oracle/db ORACLE_HOME_NAME=OraDb10g_home2

./runInstaller -silent -clone -waitForCompletion  "ORACLE_HOME=/app/oracle/db" "ORACLE_HOME_NAME=DbOra10g_Home2" -noConfig -nowait
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-07-12_11-12-09AM. Please wait ...Oracle Universal Installer, Version 10.2.0.5.0 Production
Copyright (C) 1999, 2010, Oracle. All rights reserved.

You can find a log of this install session at:
/oracle/oraInventory/logs/cloneActions2011-07-12_11-12-09AM.log
.................................................................................................... 100% Done.



Installation in progress (Tuesday, July 12, 2011 11:13:30 AM CDT)
...........................................................................                                                     75% Done.
Install successful

Linking in progress (Tuesday, July 12, 2011 11:14:22 AM CDT)
Link successful

Setup in progress (Tuesday, July 12, 2011 11:21:50 AM CDT)
Setup successful

End of install phases.(Tuesday, July 12, 2011 11:22:39 AM CDT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/app/oracle/db/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts

The cloning of DbOra10g_Home2 was successful.
Please check '/oracle/oraInventory/logs/cloneActions2011-07-12_11-12-09AM.log' for more details.