Clone Oracle Home – move to new location on the fly

Clone ORACLE HOME is the most-efficient way to create/duplicate/move oracle software with all applied patch inside. Oracle provide this Perl script as $ORACLE_HOME/clone/bin/clone.pl. It accepts ORACLE HOME and ORACLE HOME NAME as parameters.

Example
I.e there is no sufficient space in previous OEM repository database home, move it to new location
/u01/app/db10g/product/1020 from /u02/app/db10g/product/1020.

[@database_server]$ export OLD_ORACLE_HOME=/u02/app/db10g/product/1020
[@database_server]$ cd $OLD_ORACLE_HOME/..
[@database_server]$ tar cvf /tmp/OH.tar 1020

[@database_server]$ export ORACLE_BASE=/u01/app/db10g
[@database_server]$ export ORACLE_HOME=/u01/app/db10g/product/1020
[@database_server]$ cd $ORACLE_HOME/..
[@database_server]$ tar xvf /tmp/OH.tar


[@database_server]$ export PATH=$ORACLE_HOME/bin:$PATH
[@database_server]$ perl $ORACLE_HOME/clone/bin/clone.pl  ORACLE_HOME=/u01/app/db10g/product/1020 ORACLE_HOME_NAME=OraDb10g_home2

./runInstaller -silent -clone -waitForCompletion  "ORACLE_HOME=/u01/app/db10g/product/1020" "ORACLE_HOME_NAME=OraDb10g_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/OraInstall2009-05-27_11-53-04PM. Please wait …Oracle Universal Installer, Version 10.2.0.4.0 Production
Copyright (C) 1999, 2008, Oracle. All rights reserved.

You can find a log of this install session at:
 /d01/oem_inventory/db10g/inventory/logs/cloneActions2009-05-27_11-53-04PM.log
………………………………………………………………………………………. 100% Done.



Installation in progress (Wednesday, May 27, 2009 11:53:29 PM EDT)
………………………………………………………………                                                        72% Done.
Install successful

Linking in progress (Wednesday, May 27, 2009 11:53:49 PM EDT)
Link successful

Setup in progress (Wednesday, May 27, 2009 11:55:17 PM EDT)
Setup successful

End of install phases.(Wednesday, May 27, 2009 11:55:27 PM EDT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u01/app/db10g/product/1020/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts

The cloning of OraDb10g_home2 was successful.
Please check ‘/d01/oem_inventory/db10g/inventory/logs/cloneActions2009-05-27_11-53-04PM.log’ for more details.
[@database_server]$

Advertisements

About Pang

Oracle DBA working in database, fusion middleware and identity management and cloud.
This entry was posted in Installation. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s