Central Inventory is locked by another OUI instance No read permission to Central Inventory Failed in Oracle Opatch Apply 18650065

Hi,

When I apply 18650065 patch to Oracle database 12c, I got ”  Central Inventory is locked by another OUI instance No read permission to Central Inventory ” errors.

 

I have created Test database from Production database in the new Server. When I apply 18650065 patch to test database i got error like following.

[oracle@MehmetSalih 18650065]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.


Oracle Home : /oracle/12.1.0/dbhome_1
Central Inventory : /home/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.1.0.2.0
Log file location : /oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2019-07-18_11-40-57AM_1.log

List of Homes on this system:

Home name= TEST_DB__u01_oracle_product_11_2_0_3_db, Location= "/u01/oracle/product/11.2.0.3/db"
OPatchSession cannot load inventory for the given Oracle Home /oracle/12.1.0/dbhome_1. Possible causes are:
No read or write permission to ORACLE_HOME/.patch_storage
Central Inventory is locked by another OUI instance
No read permission to Central Inventory
The lock file exists in ORACLE_HOME/.patch_storage
The Oracle Home does not exist in Central Inventory

UtilSession failed: RawInventory gets null OracleHomeInfo
Log file location: /oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2019-07-18_11-40-57AM_1.log

OPatch failed with error code 73
[oracle@MehmetSalih 18650065]$

This errors are related with incorrect oraInventory parameters.

 

I have checked oraInventory, parameters are the Old one like following.

[oracle@MehmetSalih ContentsXML]$pwd
/home/oracle/oraInventory/ContentsXML
[oracle@MehmetSalih ContentsXML]$ 
[oracle@MehmetSalih ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.3.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="TEST_DB__u01_oracle_product_11_2_0_3_db" LOC="/u01/oracle/product/11.2.0.3/db" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
[oracle@MehmetSalih ContentsXML]$

 

 

 

I have corrected HOME NAME with new Home like following.

 

[oracle@MehmetSalih ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2011, Oracle. All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.1.0.2.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="DEV2_HOME" LOC="/oracle/12.1.0/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
[oracle@MehmetSalih ContentsXML]

 

Now When I try to apply patch again, it is successfull like following.

 

[oracle@MehmetSalih 18650065]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.


Oracle Home : /oracle/12.1.0/dbhome_1
Central Inventory : /home/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.1.0.2.0
Log file location : /oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2019-07-18_11-47-20AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 18650065

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/12.1.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '18650065' to OH '/oracle/12.1.0/dbhome_1'

Patching component oracle.rdbms, 12.1.0.2.0...
Patch 18650065 successfully applied.
Log file location: /oracle/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2019-07-18_11-47-20AM_1.log

OPatch succeeded.
[oracle@MehmetSalih 18650065]$

 

Patch 18650065 successfully applied to Oracle database 12c.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *