Unable to lock Central Inventory. OPatch will attempt to re-lock
When we are going to apply or rollback the patch with Oracle opatch utility. Then some time we got the following message.
OPatch will sleep for few seconds, before re-trying to get the lock...
Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
Then we have to check the permission of the Oracle Inventory folder.
1. We are running from the command prompt, then check that command prompt is running with administrator right, Right click on cmd.exe and open it with administrator rights and again run the opatch command. It will fixed the issue surely.
2. If first point not able to solve the problem,We need to check permission of the folder C:\Program Files\Oracle\Inventory\ContentsXML and right click on directory–>properties–>Security–>select give full control for your windows users for contentsXML folder.
3. If not, then ADD the user with oradba priviliges group in windows.
1. Check the permission of the folder
ls -ltr /oracle/oraInventory/ContentsXML
2. Change the permission of the Inventory folder
chmod 777 /oracle/oraInventory/ContentsXML