Not being a DBA has it’s own perks ;) Freedom to try to fix everything that do not look “legit” from all angles.
My last attempt was to rebuild “Central Inventory” for a cloned instance of Oracle Applications R12 (EBS 12.0.6) on Linux. This instance was cloned from a certified platform, to a totally unsupported platform. In addition to, the DBAs those migrated from 10g R2 to 11g R2 left much of the post clone activities pending immediately once after the instance came online.
So, trying to patch Oracle database 11gR2(11.2.0.4) brought me to a situation that never existed:
- “opatch” was “not” recognized as a command!
- “opatch lsinventory” run always screamed about corrupt/missing central inventory location.
The “opatch” not being recongized as a command was due to $ORACLE_HOME/OPatch path missing, easily fixed by adding the path to the existing $PATH environment variable for the Oracle user.
One of the other issues you might face up with 11.2.0.4 could be the unsupported opatch version. You need to replace the current opatch version with the latest supported. Please refer to patch #6880880 & Install the patch marked in the below image

Please read the “README” to know how to replace the existing version with the latest supported.
Once the opatch stack taken care of, we still need to fix the central inventory, that keeps reported as being missing.
[oratest@bak clone]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /u01/oratest/TEST/db/tech_st/11.2.0
Central Inventory : /u01/oratest/TEST/db/tech_st/11.2.0/inventory
from : /u01/oratest/TEST/db/tech_st/11.2.0/oraInst.loc
OPatch version : 11.2.0.3.25
OUI version : 11.2.0.4.0
Log file location : /u01/oratest/TEST/db/tech_st/11.2.0/cfgtoollogs/opatch/opatch2020-11-11_10-35-04AM_1.log
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
OPatch failed with error code 73
Let us see how to rebuild the Central Inventory for the EBS R12 cloned instance now.
If your current server (the one that has the cloned instance of the application) never had an Oracle installation executed from the same, will not have /etc/oraInst.loc file, instead the file must be available under $ORACLE_HOME & the file MUST BE pointing towards the source server paths. For example, my cloned instance oraInst.loc contents are like below:
>cat oraInst.loc
inventory_loc=/u05/oraprod/oraInventory
inst_group=oinstall
where inventory_loc path wrong for the current server.
You may create something equivalent to what already exists with the oraInst.loc file, for example (in my case) a path like /u01/oratest/oraInventory as “Oracle” user.
So, you need to amend the oraInst.loc file that is available with $ORACLE_HOME path like below
>cat oraInst.loc
inventory_loc=/u01/oratest/oraInventory
inst_group=oinstall
Now you can proceed building the Central Inventory.
logon as Oracle user
SHUTDOWN THE DATABASE & ALL OTHER ORACLE DATABASE RELATED SERVICES
- source the environment
- switch to $ORACLE_HOME/appsutil/clone
- execute ouicli.pl (./ouicli.pl)
Now, We will attach the current ORACLE_HOME with the Central Inventory. Many things could go wrong here, so make sure that you refer the document “How to create, update or rebuild the Central Inventory for Applications R12” in case if you are stuck for reasons those are not mentioned in this post.
As Oracle user
switch to $ORACLE_HOME/oui/bin
Execute
./runInstaller -ignoreSysPrereqs -silent -attachHome -invPtrLoc $ORACLE_HOME/oraInst.loc \
ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME=""
Example:
./runInstaller -ignoreSysPrereqs -silent -attachHome -invPtrLoc $ORACLE_HOME/oraInst.loc \
ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="TEST_Oracle_HOME"
If there are no issues, you should get ” ‘AttachHome’ was successful ” confirmation once after the installer finishes the execution.
Test opatch once again
>opatch lsinventory
The above should provide you an output like below:
[oratest@bak bin]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /u01/oratest/TEST/db/tech_st/11.2.0
Central Inventory : /u01/oratest/oraInventory
from : /u01/oratest/TEST/db/tech_st/11.2.0/oraInst.loc
OPatch version : 11.2.0.3.25
OUI version : 11.2.0.4.0
Log file location : /u01/oratest/TEST/db/tech_st/11.2.0/cfgtoollogs/opatch/opatch2020-11-11_10-42-05AM_1.log
Lsinventory Output file location : /u01/oratest/TEST/db/tech_st/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2020-11-11_10-42-
Local Machine Information::
Hostname: bak.localdomain.com
ARU platform id: 0
ARU platform description::
There are no Interim patches installed in this Oracle Home.
OPatch succeeded.
That’s all folks. You can proceed with your patching for the database now! Hope this helps few certified DBAs out there ;)
rajesh