OPatch error 73 – Applying 19.16.0.0.220719 Oracle Database Patch on Windows

Running Oracle database on Windows OS is like driving a high performance car in a parking lot! You can still do it, but it’s frustratingly annoying!

Thankfully I very rarely have to deal with that, but still, it’s a pain! The most annoying part is patching the Oracle database on Windows since just shutting down the services (Database instance, VSS Writer, and listener) doesn’t guarantee that all processes running from the database’s home has actually stopped running. I was reminded of that recently while trying to apply the 19.16.0.0.220719 DBRU and OJVM patches, when opatch apply command failed with “Prerequisite check “CheckActiveFilesAndExecutables” failed.” and “OPatch failed with error code = 73”.

I tried to use Process Explorer to find and kill the processes that were connected to the active files (as suggested in MOS note: 747049.1) but that didn’t work. So next I tried to simply rename the files to see if that helped, and voila!, it worked. Just to be clear, all I had to do was to use File Explorer, search for the file, rename it (I chose to add .orig to the extension, making the file .dll.orig) and try the opatch apply again.

Hopefully this saves someone a bit of time next time they are faced with this issue! Below is the output:

### set the environment parameters
set PATCH_LOC=G:\stage\software\database\patches\19000\unzipped
set NLS_DATE_FORMAT=YYYYMMDD-HH24:MI:SS
set ORACLE_BASE=D:\app\oracle
set ORACLE_HOME=D:\app\oracle\product\19.0.0\db_sbx19c
set PATH=%ORACLE_HOME%\perl\bin;%ORACLE_HOME%\OPatch;%PATH%
set PERL5LIB=

┌─ G:\stage\software\database\patches\19000
└──> dir
 Volume in drive G is dump
 Volume Serial Number is F8FD-F388

 Directory of G:\stage\software\database\patches\19000

08/15/2022  10:05 AM    <DIR>          .
08/15/2022  10:05 AM    <DIR>          ..
08/15/2022  10:05 AM    <DIR>          19.16.0.0.220719_DBRU_win_Patch34110685
08/15/2022  10:05 AM    <DIR>          19.16.0.0.220719_OJVM_win_Patch34086870
08/15/2022  10:03 AM    <DIR>          unzipped
			   0 File(s)              0 bytes
			   5 Dir(s)  392,841,457,664 bytes free

┌─ G:\stage\software\database\patches\19000
└──> dir unzipped
 Volume in drive G is dump
 Volume Serial Number is F8FD-F388

 Directory of G:\stage\software\database\patches\19000\unzipped

08/15/2022  10:28 AM    <DIR>          .
08/15/2022  10:28 AM    <DIR>          ..
07/28/2022  09:40 AM    <DIR>          34086870		<<== OJVM
07/29/2022  06:47 AM    <DIR>          34110685		<<== DBRU
07/04/2022  02:32 AM    <DIR>          OPatch
08/05/2022  09:05 AM            10,635 PatchSearch.xml
			   1 File(s)         10,635 bytes
			   5 Dir(s)  387,771,850,752 bytes free


┌─ G:\stage\software\database\patches\19000
└──> where opatch
D:\app\oracle\product\19.0.0\db_sbx19c\OPatch\opatch
D:\app\oracle\product\19.0.0\db_sbx19c\OPatch\opatch.bat

┌─ G:\stage\software\database\patches\19000
└──> opatch lspatches
32832237;Windows Database Bundle Patch : 19.12.0.0.210720 (32832237)

┌─ G:\stage\software\database\patches\19000
└──> opatch version
OPatch Version: 12.2.0.1.32

OPatch succeeded.

#### Apply DBRU
┌─ G:\
└──> cd %PATCH_LOC%\34110685

┌─ G:\stage\software\database\patches\19000\unzipped\34110685
└──> %ORACLE_HOME%\OPatch\opatch apply
Oracle Interim Patch Installer version 12.2.0.1.32
Copyright (c) 2022, Oracle Corporation.  All rights reserved.


Oracle Home       : D:\app\oracle\product\19.0.0\db_sbx19c
Central Inventory : D:\app\oracle\Inventory
   from           :
OPatch version    : 12.2.0.1.32
OUI version       : 12.2.0.7.0
Log file location : D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_10-44-58AM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:

Following active files/executables/libs are used by ORACLE_HOME :D:\app\oracle\product\19.0.0\db_sbx19c

D:\app\oracle\product\19.0.0\db_sbx19c\bin\oravssmsgus.dll
D:\app\oracle\product\19.0.0\db_sbx19c\bin\ORAEVRUS19.dll
D:\app\oracle\product\19.0.0\db_sbx19c\oui\jlib\srvm.jar


UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_10-44-58AM_1.log

OPatch failed with error code = 73

Here is searched for and renamed the 3 files and then tried the opatch apply again:

┌─ G:\stage\software\database\patches\19000\unzipped\34110685
└──> %ORACLE_HOME%\OPatch\opatch apply
Oracle Interim Patch Installer version 12.2.0.1.32
Copyright (c) 2022, Oracle Corporation.  All rights reserved.


Oracle Home       : D:\app\oracle\product\19.0.0\db_sbx19c
Central Inventory : D:\app\oracle\Inventory
   from           :
OPatch version    : 12.2.0.1.32
OUI version       : 12.2.0.7.0
Log file location : D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_11-16-35AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   34110685

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'D:\app\oracle\product\19.0.0\db_sbx19c')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '34110685' to OH 'D:\app\oracle\product\19.0.0\db_sbx19c'
ApplySession: Optional component(s) [ oracle.tomcat.crs, 19.0.0.0.0 ] , [ oracle.has.deconfig, 19.0.0.0.0 ] , [ oracle.swd.oui.core.min, 19.0.0.0.0 ] , [ oracle.has.cfs, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.rhp.crs, 19.0.0.0.0 ] , [ oracle.has.cvu, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.usm, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.ons.daemon, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.swd.oui, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.has.crs, 19.0.0.0.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.has.common.cvu, 19.0.0.0.0...

Patching component oracle.has.rsf, 19.0.0.0.0...

Patching component oracle.assistants.server, 19.0.0.0.0...

Patching component oracle.ons, 19.0.0.0.0...

Patching component oracle.has.common, 19.0.0.0.0...

Patching component oracle.rdbms.util, 19.0.0.0.0...

Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...

Patching component oracle.sqlplus, 19.0.0.0.0...

Patching component oracle.dbjava.jdbc, 19.0.0.0.0...

Patching component oracle.network.listener, 19.0.0.0.0...

Patching component oracle.odbc.ic, 19.0.0.0.0...

Patching component oracle.rdbms.rman, 19.0.0.0.0...

Patching component oracle.dbjava.ucp, 19.0.0.0.0...

Patching component oracle.ldap.rsf, 19.0.0.0.0...

Patching component oracle.precomp.common.core, 19.0.0.0.0...

Patching component oracle.oracore.rsf, 19.0.0.0.0...

Patching component oracle.ntoledb.odp_net_2, 19.0.0.0.0...

Patching component oracle.has.db, 19.0.0.0.0...

Patching component oracle.ntoramts, 19.0.0.0.0...

Patching component oracle.marvel, 19.0.0.0.0...

Patching component oracle.xdk.parser.java, 19.0.0.0.0...

Patching component oracle.network.client, 19.0.0.0.0...

Patching component oracle.blaslapack, 19.0.0.0.0...

Patching component oracle.tfa.db, 19.0.0.0.0...

Patching component oracle.ctx, 19.0.0.0.0...

Patching component oracle.rdbms.hsodbc, 19.0.0.0.0...

Patching component oracle.assistants.deconfig, 19.0.0.0.0...

Patching component oracle.ldap.owm, 19.0.0.0.0...

Patching component oracle.duma, 19.0.0.0.0...

Patching component oracle.precomp.lang, 19.0.0.0.0...

Patching component oracle.rdbms.rsf, 19.0.0.0.0...

Patching component oracle.rdbms.install.common, 19.0.0.0.0...

Patching component oracle.ldap.security.osdt, 19.0.0.0.0...

Patching component oracle.sdo, 19.0.0.0.0...

Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...

Patching component oracle.sqlplus.ic, 19.0.0.0.0...

Patching component oracle.rdbms.lbac, 19.0.0.0.0...

Patching component oracle.oraolap, 19.0.0.0.0...

Patching component oracle.precomp.rsf, 19.0.0.0.0...

Patching component oracle.ntoledbolap, 19.0.0.0.0...

Patching component oracle.assistants.acf, 19.0.0.0.0...

Patching component oracle.ntoledb, 19.0.0.0.0...

Patching component oracle.javavm.server, 19.0.0.0.0...

Patching component oracle.precomp.common, 19.0.0.0.0...

Patching component oracle.network.rsf, 19.0.0.0.0...

Patching component oracle.ovm, 19.0.0.0.0...

Patching component oracle.install.deinstalltool, 19.0.0.0.0...

Patching component oracle.rdbms.oci, 19.0.0.0.0...

Patching component oracle.rsf, 19.0.0.0.0...

Patching component oracle.clrintg.ode_net_2, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...

Patching component oracle.javavm.client, 19.0.0.0.0...

Patching component oracle.rdbms.deconfig, 19.0.0.0.0...

Patching component oracle.dbjava.ic, 19.0.0.0.0...

Patching component oracle.rdbms.dv, 19.0.0.0.0...

Patching component oracle.aspnet_2, 19.0.0.0.0...

Patching component oracle.usm.deconfig, 19.0.0.0.0...

Patching component oracle.dbdev, 19.0.0.0.0...

Patching component oracle.ons.ic, 19.0.0.0.0...

Patching component oracle.mgw.common, 19.0.0.0.0...

Patching component oracle.xdk, 19.0.0.0.0...

Patching component oracle.oracler.server, 19.0.0.0.0...

Patching component oracle.rdbms.plsql, 19.0.0.0.0...

Patching component oracle.xdk.rsf, 19.0.0.0.0...

Patching component oracle.ctx.atg, 19.0.0.0.0...

Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...

Patching component oracle.rdbms.olap, 19.0.0.0.0...

Patching component oracle.rdbms, 19.0.0.0.0...

Patching component oracle.sdo.locator, 19.0.0.0.0...

Patching component oracle.rdbms.scheduler, 19.0.0.0.0...

Patching component oracle.xdk.xquery, 19.0.0.0.0...

Patching component oracle.jdk, 1.8.0.201.0...
Patch 34110685 successfully applied.
Sub-set patch [32832237] has become inactive due to the application of a super-set patch [34110685].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_11-16-35AM_1.log

OPatch succeeded.



#### Apply OJVM patch
┌─ G:\stage\software\database\patches\19000\unzipped\34110685
└──> cd %PATCH_LOC%\34086870

┌─ G:\stage\software\database\patches\19000\unzipped\34086870
└──> %ORACLE_HOME%\OPatch\opatch apply
Oracle Interim Patch Installer version 12.2.0.1.32
Copyright (c) 2022, Oracle Corporation.  All rights reserved.


Oracle Home       : D:\app\oracle\product\19.0.0\db_sbx19c
Central Inventory : D:\app\oracle\Inventory
   from           :
OPatch version    : 12.2.0.1.32
OUI version       : 12.2.0.7.0
Log file location : D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_11-22-14AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   34086870

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'D:\app\oracle\product\19.0.0\db_sbx19c')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '34086870' to OH 'D:\app\oracle\product\19.0.0\db_sbx19c'

Patching component oracle.rdbms, 19.0.0.0.0...

Patching component oracle.javavm.server.core, 19.0.0.0.0...

Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...

Patching component oracle.javavm.server, 19.0.0.0.0...

Patching component oracle.javavm.client, 19.0.0.0.0...
Patch 34086870 successfully applied.
Log file location: D:\app\oracle\product\19.0.0\db_sbx19c\cfgtoollogs\opatch\opatch2022-08-15_11-22-14AM_1.log

OPatch succeeded.