

Por alguma razão quando o $ORACLE_HOME é removido do inventário, o DBA irá encontrar o erro “Inventory load failed… OPatch cannot load inventory for the given Oracle Home” quando se tentar executar o utilitário do opatch (localizado em $ORACLE_HOME/OPatch/opatch) para verificar os patches aplicados no ambiente de banco de dados Oracle.
Com isso, neste post estarei exemplificando como resolver este problema.
Causa raíz: Por alguma razão o $ORACLE_HOME foi removido do inventário.
Solucao: Simplesmente adicione novamente o ORACLE_HOME ao inventário do banco de dados Oracle.
(Exemplo para 3 ORACLE_HOME de 3 versoes diferentes 11.2.0.3, 11.2.0.4 e 12.1.02:
$ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/11203 ORACLE_HOME_NAME=dbhome11203 -invPtrLoc /etc/oraInst.loc $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/11204 ORACLE_HOME_NAME=dbhome11204 -invPtrLoc /etc/oraInst.loc $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/12102 ORACLE_HOME_NAME=dbhome12102 -invPtrLoc /etc/oraInst.loc
Exemplo / DEMO:
PROBLEM:
techdatabasketserver brunodb/opt/oracle $ /opt/oracle/product/12102/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.5
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/12102
Central Inventory : /opt/oracle/oraInventory12102
from : /opt/oracle/product/12102/oraInst.loc
OPatch version : 12.1.0.1.5
OUI version : 12.1.0.2.0
Log file location : /opt/oracle/product/12102/cfgtoollogs/opatch/opatch2017-09-22_20-05-08PM_1.log
OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
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
Plano de Ação:
techdatabasketserver brunodb/opt/oracle $ $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/12102 ORACLE_HOME_NAME=dbhome12102 -invPtrLoc /etc/oraInst.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 24575 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful.
Check:
techdatabasketserver brunodb/opt/oracle $ /opt/oracle/product/12102/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.5
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/12102
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/12102/oraInst.loc
OPatch version : 12.1.0.1.5
OUI version : 12.1.0.2.0
Log file location : /opt/oracle/product/12102/cfgtoollogs/opatch/opatch2017-09-22_20-06-23PM_1.log
Lsinventory Output file location : /opt/oracle/product/12102/cfgtoollogs/opatch/lsinv/lsinventory2017-09-22_20-06-23PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 19769480 : applied on Thu Jun 25 16:46:04 CEST 2015
Unique Patch ID: 18350083
Patch description: "Database Patch Set Update : 12.1.0.2.2 (19769480)"
Created on 15 Dec 2014, 06:54:52 hrs PST8PDT
Bugs fixed:
20284155, 19157754, 18885870, 19303936, 19708632, 19371175, 18618122
19329654, 19075256, 19074147, 19044962, 19289642, 19068610, 18988834
19028800, 19561643, 19058490, 19390567, 18967382, 19174942, 19174521
19176223, 19501299, 19178851, 18948177, 18674047, 19723336, 19189525
19001390, 19176326, 19280225, 19143550, 18250893, 19180770, 19155797
19016730, 19185876, 18354830, 19067244, 18845653, 18849537, 18964978
19065556, 19440586, 19439759, 19024808, 18952989, 18990693, 19052488
19189317, 19409212, 19124589, 19154375, 19279273, 19468347, 19054077
19048007, 19248799, 19018206, 18921743, 14643995, 18456643, 16870214
19434529, 19706965, 17835294, 20074391, 18791688, 19197175, 19134173
19174430, 19050649, 19769480, 19077215, 19577410, 18288842, 18436647
19520602, 19149990, 19076343, 19195895, 18610915, 19068970, 19518079
19304354, 19001359, 19676905, 19309466, 19382851, 18964939, 16359751
19022470, 19532017, 19597439, 18674024, 19430401
--------------------------------------------------------------------------------
OPatch succeeded.

For some reason when $ORACLE_HOME was removed from the inventory,the DBA will encounter the “Inventory load failed … OPatch can not load inventory for Oracle Home” error when attempting to run the opatch utility (located in $ ORACLE_HOME / OPatch / opatch) to check the patches applied in the Oracle database environment.
With this, in this post I will explain how to solve this problem.
Solution: Simply re-add the $ORACLE_HOME to the inventory.
(An example of adding 3 ORACLE_HOME):
$ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/11203 ORACLE_HOME_NAME=dbhome11203 -invPtrLoc /etc/oraInst.loc $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/11204 ORACLE_HOME_NAME=dbhome11204 -invPtrLoc /etc/oraInst.loc $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/12102 ORACLE_HOME_NAME=dbhome12102 -invPtrLoc /etc/oraInst.loc
Root cause: For some reason the $ORACLE_HOME were removed from inventory.
Here an example / DEMO:
PROBLEM:
techdatabasketserver brunodb/opt/oracle $ /opt/oracle/product/12102/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.5
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/12102
Central Inventory : /opt/oracle/oraInventory12102
from : /opt/oracle/product/12102/oraInst.loc
OPatch version : 12.1.0.1.5
OUI version : 12.1.0.2.0
Log file location : /opt/oracle/product/12102/cfgtoollogs/opatch/opatch2017-09-22_20-05-08PM_1.log
OPatch failed to locate Central Inventory.
Possible causes are:
The Central Inventory is corrupted
The oraInst.loc file specified is not valid.
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
ACTION PLAN:
techdatabasketserver brunodb/opt/oracle $ $ORACLE_HOME/oui/bin/runInstaller -silent -attachHome ORACLE_HOME=/opt/oracle/product/12102 ORACLE_HOME_NAME=dbhome12102 -invPtrLoc /etc/oraInst.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 24575 MB Passed The inventory pointer is located at /etc/oraInst.loc 'AttachHome' was successful.
CHECK:
techdatabasketserver brunodb/opt/oracle $ /opt/oracle/product/12102/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.5
Copyright (c) 2017, Oracle Corporation. All rights reserved.
Oracle Home : /opt/oracle/product/12102
Central Inventory : /opt/oracle/oraInventory
from : /opt/oracle/product/12102/oraInst.loc
OPatch version : 12.1.0.1.5
OUI version : 12.1.0.2.0
Log file location : /opt/oracle/product/12102/cfgtoollogs/opatch/opatch2017-09-22_20-06-23PM_1.log
Lsinventory Output file location : /opt/oracle/product/12102/cfgtoollogs/opatch/lsinv/lsinventory2017-09-22_20-06-23PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 19769480 : applied on Thu Jun 25 16:46:04 CEST 2015
Unique Patch ID: 18350083
Patch description: "Database Patch Set Update : 12.1.0.2.2 (19769480)"
Created on 15 Dec 2014, 06:54:52 hrs PST8PDT
Bugs fixed:
20284155, 19157754, 18885870, 19303936, 19708632, 19371175, 18618122
19329654, 19075256, 19074147, 19044962, 19289642, 19068610, 18988834
19028800, 19561643, 19058490, 19390567, 18967382, 19174942, 19174521
19176223, 19501299, 19178851, 18948177, 18674047, 19723336, 19189525
19001390, 19176326, 19280225, 19143550, 18250893, 19180770, 19155797
19016730, 19185876, 18354830, 19067244, 18845653, 18849537, 18964978
19065556, 19440586, 19439759, 19024808, 18952989, 18990693, 19052488
19189317, 19409212, 19124589, 19154375, 19279273, 19468347, 19054077
19048007, 19248799, 19018206, 18921743, 14643995, 18456643, 16870214
19434529, 19706965, 17835294, 20074391, 18791688, 19197175, 19134173
19174430, 19050649, 19769480, 19077215, 19577410, 18288842, 18436647
19520602, 19149990, 19076343, 19195895, 18610915, 19068970, 19518079
19304354, 19001359, 19676905, 19309466, 19382851, 18964939, 16359751
19022470, 19532017, 19597439, 18674024, 19430401
--------------------------------------------------------------------------------
OPatch succeeded.


*The views expressed here are my own and do not represent those of my employer.*
Hello, I’m Bruno — a dual citizen of Brazil and Sweden. I bring a global perspective shaped by experiences in both South America and Europe, with a strong focus on collaboration and innovation across cultures. I am a Computer Scientist, PhD Candidate in Information and Communication Technologies, focusing on Data Science and Artificial Intelligence, and hold dual Master’s degrees in Data Science and Cybersecurity. With over fifteen years of international experience spanning Brazil, Hungary, and Sweden, I have collaborated with global organizations such as IBM, Playtech, and Oracle, as well as contributed remotely to projects across multiple regions. My professional interests include Databases, Cybersecurity, Cloud Computing, Data Science, Data Engineering, Big Data, Artificial Intelligence, Programming, and Software Engineering, all driven by a deep passion for transforming data into strategic business value.
… [Trackback]
[…] Information on that Topic: techdatabasket.com/2017/11/11/inventory-load-failed-opatch-cannot-load-inventory-for-the-given-oracle-home/ […]
… [Trackback]
[…] Read More Info here to that Topic: techdatabasket.com/2017/11/11/inventory-load-failed-opatch-cannot-load-inventory-for-the-given-oracle-home/ […]
… [Trackback]
[…] There you can find 77178 additional Information on that Topic: techdatabasket.com/2017/11/11/inventory-load-failed-opatch-cannot-load-inventory-for-the-given-oracle-home/ […]
… [Trackback]
[…] Find More here to that Topic: techdatabasket.com/2017/11/11/inventory-load-failed-opatch-cannot-load-inventory-for-the-given-oracle-home/ […]