Opatch: LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo : OPatch failed with error code 73
Problem
While running opatch lsinventory, command fails with the below error:
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
Solution
Attach the Oracle Home to the Central Inventory:
$ cd $ORACLE_HOME/oui/bin
$ ./attachHome.sh
Now check, command should work fine.
$ORACLE_HOME/OPatch/opatch lsinventory
How to move the central Inventory (oraInventory) to another location.
Solution On Unix:
Find the current location of the central inventory (normally $ORACLE_BASE/oraInventory):
For example:
find /home/oracle -name oraInventory -print
/u01/app/oracle/oraInventory
Open the oraInst.loc file in /var/opt/oracle and check the value of inventory_loc
cat /var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall
Remark: The oraInst.loc file is simply a pointer to the location of the central inventory (oraInventory)
Copy the oraInventory directory to the destination directory
cp -Rp /home/oracle/oraInventory /app/oracle
Edit the oraInst.loc file to point to the new location
For example:
vi /var/opt/oracle/oraInst.loc
inventory_loc=/app/oracle/oraInventory inst_group=dba
Problem
While running opatch lsinventory, command fails with the below error:
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
Solution
Attach the Oracle Home to the Central Inventory:
$ cd $ORACLE_HOME/oui/bin
$ ./attachHome.sh
Now check, command should work fine.
$ORACLE_HOME/OPatch/opatch lsinventory
How to move the central Inventory (oraInventory) to another location.
Solution On Unix:
Find the current location of the central inventory (normally $ORACLE_BASE/oraInventory):
For example:
find /home/oracle -name oraInventory -print
/u01/app/oracle/oraInventory
Open the oraInst.loc file in /var/opt/oracle and check the value of inventory_loc
cat /var/opt/oracle/oraInst.loc
inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall
Remark: The oraInst.loc file is simply a pointer to the location of the central inventory (oraInventory)
Copy the oraInventory directory to the destination directory
cp -Rp /home/oracle/oraInventory /app/oracle
Edit the oraInst.loc file to point to the new location
For example:
vi /var/opt/oracle/oraInst.loc
inventory_loc=/app/oracle/oraInventory inst_group=dba
No comments:
Post a Comment