OPatch throwing "Unable to lock Central Inventory" on Windows 7 (Doc ID 1568694.1)

Last updated on MAY 31, 2017

Applies to:

Oracle Universal Installer - Version 10.2.0.5 to 12.1.0.1 [Release 10.2 to 12.1]
Oracle Fusion Middleware - Version 11.1.1.2.0 and later
Microsoft Windows (32-bit) - OS Version: 7
Microsoft Windows x64 (64-bit) - OS Version: 7

Symptoms

OPatch throwing the following error when trying to apply or rollback a patch:

C:\Users\oracle\Desktop\16803775>C:\app\oracle\product\11.2.0\dbhome_1\OPatch\opatch apply
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : C:\app\oracle\product\11.2.0\dbhome_1
Central Inventory : C:\Program Files\Oracle\Inventory
   from           : n/a
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.3.0
Log file location : C:\app\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\16803775_Jul_12_2013_17_47_25\apply2013-07-12_17-47-24PM_1.log

Applying interim patch '16803775' to OH 'C:\app\oracle\product\11.2.0\dbhome_1'
Verifying environment and performing prerequisite checks...
OiiolLogger.addFileHandler:Error while adding file handler - C:\Program Files\Oracle\Inventory/logs\OPatch2013-07-12_05-47-32-PM.log
java.io.FileNotFoundException: C:\Program Files\Oracle\Inventory\logs\OPatch2013-07-12_05-47-32-PM.log (Access is denied)
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 C:\app\oracle\product\11.2.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

OPatch failed: ApplySession failed to prepare the system. Unable to lock Central Inventory.  Stop trying per user-request?
Log file location: C:\app\oracle\product\11.2.0\dbhome_1\cfgtoollogs\opatch\16803775_Jul_12_2013_17_47_25\apply2013-07-12_17-47-24PM_1.log

OPatch failed with error code = 22

 

 

 

Changes

 Trying to apply or rollback a patch

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms