Friday, October 31, 2008

Unable to lock Central Inventory Error

When YOU encounter OPATCH error "Unable to lock Central Inventory. 

Opatch usually throw below error

"

Oracle Home : /u01/app/oraprd/product/10.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /var/opt/oracle/oraInst.loc
OPatch version : 10.2.0.3.2
OUI version : 10.2.0.3.0
OUI location : /u01/app/oraprd/product/10.2.0/db_1/oui
Log file location : /u01/app/oraprd/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2007-09-22_09-50-02AM.log

Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
n
User Responded with: N
Unable to lock Central Inventory. Stop trying per user-request?
OPatchSession cannot load inventory for the given Oracle Home /u01/app/oraprd/product/10.2.0/db_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

So how do i fix this ?

You can do the follwing to fix this error.

Go to $ORACLE_HOME/.patch_stage directory see if you can directory name called 'lock' if yes remove that direcoty and re-run opatch apply command , else go to oracle central inventory directory (ex:/u01/app/oraInventory)  and see if you can find out lock directory , if yes remove this and re-rin opatch apply command.

Else

export OPATCH_DEBUG=TRUE
and then run opatch apply.

this will give you the exact phase where your patch is failing

7 comments:

Anonymous said...

great help thank you

Sachin Jain said...

if you are on Windows, open your command window as an administrator (Run as administrator)!

Anonymous said...

Run as Administrator worked! Thanks! Now I got $ORACLE_HOME\oui\jlib\srvm.jar locked

Lukillas said...

Yes, it worked!!! :)

Viswanath said...

Running as administrator worked...Thanks a Lot Sachin.

Viswanath

Anonymous said...

Run as Administrator worked! Thanks!

Prologic Corporation said...

This is a good article & good site.Thank you for sharing this article. It is help us following categorize:
healthcare, e commerce, programming, multi platform,inventory management, cloud-based solutions, it consulting, retail, manufacturing, CRM, technology means, digital supply chain management, Delivering high-quality service for your business applications,
Solutions for all Industries,packaged applications,business applications, Web services,
Business intelligence, Business Development, Software Development etc.


Our address:
2002 Timberloch Place, Suite 200
The Woodlands, TX 77380
281-364-1799

prologic-corp