Top and most common OPATCH issues in Windows server

Here are the 4 Top and most common  OPATCH issues in Windows server

Issue 1 OPatch cannot find a valid oraInst.loc file to locate Central Inventory.

OPatch failed with error code = 104


On UNIX-based systems, OPatch uses an oraInst.loc file to determine the location of the central inventory. On Windows, this is done by a registry entry instead: the key is Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\inst_loc. On this system, the central inventory registry key was missing because the installation had been done manually by copying the binaries into place rather than running the WLS installer, and the registry had not been updated. This was why the central inventory could not be found.

1.Launch regedit as a Windows administrator.
2.Navigate to the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\inst_loc key.
3.Edit the value of the key to point to the Oracle central inventory.
4.Save your changes.
5.Run opatch again and verify that it now works as expected.

Issue 2
Problems are reported while installing a patch or patchset using opatch on a Windows platform. “Couldn’t copy errors” are
reported in the logs, or “failure to backup” errors. The apply log shows a list of files that could not be backed up or copied.

Files are locked by the operating system (as being in use).

The patching process is attempting to install a new copy of a particular file from the patch source software, but the operating system does not allow it. This can be caused by running Oracle processes, operating system processes such as automated backups, and locks by third party software.

Windows suffers from the severe limitation of only having one environment. For that reason, you must shut down ALL running Oracle Processes running out of ALL Oracle Homes before installing or patching ANY Oracle software on Windows.

The operating system can also lock files, as well as some backup software and anti-virus programs.

The use of failover and failsafe services, both Oracle and non-Oracle, can also lock files, as these services attempt to check on status with client connections. These services must also be stopped when patching on Windows.

The same problem keeps files from being backed up.


The first solution to try is to set all Oracle Services to start in “Manual” mode and reboot before attempting to install the patch using opatch again. The second solution is to boot to Safe Mode to install the patch. Either way, running Oracle processes are removed as a possible cause to this problem.

In every case, DO NOT rollback before trying “opatch apply” again. Simply stop the offending process, then attempt “opatch apply” again.

Issue 3

Opatch failed with below error message

Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|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


Due to Windows security, OPatch must run in a command window that was opened As Administrator

1.Open cmd.exe As Administrator
2.Apply the patch

Issue 4

%ORACLE_HOME%\OPatch\opatch lsinventory -jdk C:\Program Files\Java\jdk1.6.0_33
File Not Found
Java could not be located. OPatch cannot proceed!


space in the directory of java


Use the short name of the folder/directory in the absolute path.

To identify the short name, open DOS prompt (window) and execute the directory command with the “X” flag as below:

C:\> dir /X

You will see an output similar to this:

02/16/2019 12:32 PM <DIR> PROGRA~1 Program Files
03/13/2019 04:42 AM <DIR> PROGRA~2 Program Files (x86)

In the output above, “PROGRA~1” is the directory’s short name.
Navigate to the Java directory as follows:

C:\> cd PROGRA~1\Java\jdk1.6.0_33

So command will be

%ORACLE_HOME%\OPatch\opatch lsinventory -jdk C:\PROGRA~1\Java\jdk1.6.0_33

Related Articles

Running Opatch throws up org.xml.sax.SAXParseException: : XML-20108: (Fatal Error) Start of root element expected

How to run Opatch in non interactive form

How to rollback the Oracle patch

Leave a Reply