Cloning an ORACLE_HOME
Posted by jason on Feb 8th, 2008
Some time you may have a requirement to copy an ORACLE_HOME from one location to another using OS level commands. However, one thing this will not do is update the Oracle Inventory. Having an incomplete Inventory will screw up any attempts at subsequent patching of this cloned ORACLE_HOME.
oracle@bdb ~]$ opatch lsinventory Invoking OPatch 10.2.0.4.2 Oracle Interim Patch Installer version 10.2.0.4.2 Copyright (c) 2007, Oracle Corporation. All rights reserved. Oracle Home : /opt/oracle/product/10.2.0.2 Central Inventory : /home/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 10.2.0.4.2 OUI version : 10.2.0.2.0 OUI location : /opt/oracle/product/10.2.0.2/oui Log file location : /opt/oracle/product/10.2.0.2/cfgtoollogs/opatch/opatch2008-02-08_11-58-44AM.log List of Homes on this system: Home name= OraDb10g_home1, Location= "/opt/oracle/product/10.2.0" Home name= OraDb10g_home2, Location= "/opt/oracle/product/11.1.0" Inventory load failed... OPatch cannot load inventory for the given Oracle Home. Possible causes are: Oracle Home dir. path does not exist in Central Inventory Oracle Home is a symbolic link Oracle Home inventory is corrupted LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo OPatch failed with error code 73
Oracle clearly support the ability to clone an ORACLE_HOME as the oui installer has an option to attach a cloned home to the Inventory:
runInstaller -attachHome ORACLE_HOME="/opt/oracle/product/10.2.0.2" ORACLE_HOME_NAME="ORADB_102"
After you have attached the cloned home you can quite happily apply interim patches and patchsets to your newly cloned ORACLE_HOME.


February 18th, 2008 at 8:19 pm
Thanks, Jason - this will come in really handy at my current site and I wasn’t familiar with it.
February 21st, 2008 at 8:34 am
Hi Doug,
Glad to help. Also good you have spotted my other blog!
jason.
September 18th, 2008 at 2:21 pm
Hi could you make the ORACLE_HOME_NAME visible.
runInstaller -attachHome ORACLE_HOME=”/opt/oracle/product/10.2.0.2″ ORACLE_HOME_NAME=”