Cloning Oracle Homes

You are tired of installing and patching Oracle Software over and over again and creating response files for a silent installation is to cumbersome for you? May be Oracle Home cloning is what you are looking for!

Step 1 - Create an tar-file on the source server

[oracle@centos4-ora10g ~]$ cd /opt/oracle/
[oracle@centos4-ora10g oracle]$ tar -cjf ~/ora10gr2.tar.bz2 ora10g
[oracle@centos4-ora10g oracle]$ cd
[oracle@centos4-ora10g ~]$ ls -l
total 583484
-rw-r--r--  1 oracle oinstall 596885752 Jan 23 08:45 ora10gr2.tar.bz2
-rw-r--r--  1 oracle oinstall      1023 Oct 26  2006 oraenv.sh
-rw-r--r--  1 oracle oinstall       804 Jul 14  2007 ora_gc.sh

Step 2 - Copy the tar-file to the target

[oracle@centos4-ora10g ~]$ scp ora10gr2.tar.bz2 oracle@192.168.76.100:/tmp/

Step 3 - Extract the tar-file on the target

-bash-2.05b$ cd /opt/oracle/
-bash-2.05b$ tar -xjf /tmp/ora10gr2.tar.bz2

Step 4 - Start the Cloning process

-bash-2.05b$ /opt/oracle/ora10g/oui/bin/runInstaller \\
-silent \\
-clone ORACLE_HOME="/opt/oracle/ora10g" \\
ORACLE_HOME_NAME="ora10g"

Starting Oracle Universal Installer...

You can find a log of this install session at:
 /opt/oracle/oraInventory/logs/cloneActions2008-02-26_05-42-48AM.log

Installation in progress (Tue Feb 26 05:44:01 CET 2008)
Install successful

Linking in progress (Tue Feb 26 05:44:09 CET 2008)
Link successful

Setup in progress (Tue Feb 26 05:47:50 CET 2008)
Setup successful

End of install phases.(Tue Feb 26 05:48:00 CET 2008)

Step 5 - Run the orainstRoot.sh and root.sh as usual

$ su -
Password: 
[root@centos3-t01 root]# /opt/oracle/oraInventory/orainstRoot.sh
Changing permissions of /opt/oracle/oraInventory to 770.
Changing groupname of /opt/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@centos3-t01 root]# /opt/oracle/ora10g/root.sh

Step 6 - Configuration and Cleanup

The Oracle Home is now ready to use, but before you start with your configuration work,
check and cleanup the following directories:

  • $ORACLE_HOME/dbs
  • $ORACLE_HOME/network/admin