Windows | OPatch failed with error code = 73

Few times I mentioned in my posts that I have many Oracle products installed on my laptop/PCs. Such setup could cause unexpected hurdles while trying to deal with specific requirements & I had such one last time while trying to apply a bundle patch on Oracle database 19c.

D:\Oracle_Installers\Patch21\p35681552_190000_MSWIN-x86-64\35681552>d:\oracle19c\OPatch\opatch.bat apply
Oracle Interim Patch Installer version 12.2.0.1.40
Copyright (c) 2023, Oracle Corporation. All rights reserved.


Oracle Home : d:\Oracle19c
Central Inventory : C:\Program Files (x86)\Oracle\Inventory
from :
OPatch version : 12.2.0.1.40
OUI version : 12.2.0.7.0
Log file location : d:\Oracle19c\cfgtoollogs\opatch\opatch2023-12-19_09-49-12AM_1.log

List of Homes on this system:

Home name= OracleWorkFlow, Location= "D:\OracleWorflow_1"
Home name= DevSuiteHome1, Location= "D:\DevSuiteHome_1"
Home name= OracleHome1, Location= "D:\Weblogic\Middleware\Oracle_Home"
Home name= OraClient19Home1_32bit, Location= "D:\oracle\product\19.0.0\client_1"
OPatchSession cannot load inventory for the given Oracle Home d:\Oracle19c. 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: d:\Oracle19c\cfgtoollogs\opatch\opatch2023-12-19_09-49-12AM_1.log

OPatch failed with error code = 73

As I have many Oracle products installed, I adjust the PATH environment variable based on the current requirement usually without setting up ORACLE_HOME or ORACLE_SID. Most of the times this setup works, few other times I must restart the laptop/PC to achieve the desired results.

I rushed to check the inventory entry for the Oracle database home & some unknown reasons, I couldn’t find an entry, leaving me with no options other than recreating it.

<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2023, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>12.2.0.7.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OracleWorkFlow" LOC="D:\OracleWorflow_1" TYPE="O" IDX="3"/>
<HOME NAME="DevSuiteHome1" LOC="D:\DevSuiteHome_1" TYPE="O" IDX="1"/>
<HOME NAME="OracleHome1" LOC="D:\Weblogic\Middleware\Oracle_Home" TYPE="O" IDX="4"/>
<HOME NAME="OraClient19Home1_32bit" LOC="D:\oracle\product\19.0.0\client_1" TYPE="O" IDX="5"/>
<HOME NAME="oracleas1" LOC="D:\OraHome_1" TYPE="O" IDX="2" REMOVED="T"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

To recreate the inventory entry, we need to know both ORACLE_HOME and ORACLE_HOME_NAME entry values. On Windows, it is pretty easy to get them from the Windows registry.

With these details in hand, we can see how to recreate the entry for database using the suggested methods. I will not mind a manual entry in the file for another round experiments though ;)

Move to $ORACLE_HOME\oui\bin folder from an elevated command prompt and execute the following. (Make sure you change the ORACLE_HOME and ORACLE_HOME_NAME based on your setup!)

setup.exe -silent -attachHome ORACLE_HOME=D:\Oracle19c ORACLE_HOME_NAME=OraDB19Home1

This should create a new entry in the inventory file & one could continue with the patching or other intended activity that involves the inventory from here onward.

Debug an “EXE” file using Visual Studio

Recently, while dealing with some nasty issues related Widows 11 Snipping Tool recording, an interesting visitor said something like “while debugging snipping tool” & it caught my attention! So I did a quick research and realized that I can use VS(Visual Studio) to open an EXE file and do the “debugging”! So let us see how this “debugging” works. Please note, this is not as in you are going to fix anything yourself, instead the whole process gives you an idea about what is going wrong.

We will use “Snipping Tool” for this exercise. Start Snipping Tool and keep it minimized. From the Task manager, let us see where is the physical location for the executable.

Use the “Copy as path” for getting the whole path for the executable.

Open up Visual Studio, I am using Visual Studio 2019 Community edition.

Once the file opened, you will see a screen like below

Now, we need to attach this opened EXE with a running process. Click on the “Attach…” button now, that will open up a window with currently running processes.

Now go back to your application. In our case, “Snipping Tool” and try to do a screen recording.

My current setup doesn’t work for Snipping Tool screen recording and the above error display doesn’t tell the user what went wrong. Windows Event Viewer is not much help either in this case of Snipping Tool. So, let us go back to Visual Studio and see whether we can get more information about the exception.

Now, we know what went wrong, right? Interested to fix it? Well, I think we are at the mercy of Microsoft to fix such issues with their application. According to the visitor, the failing call is due to the intel driver and he has created a Microsoft Feedback entry already listing them.

So, this is one of the most inexpensive ways to understand why a particular EXE is failing & as as I stated in the beginning of the article, not truly “debugging” as in debugging. Hope, you enjoyed this article!