Patching on Windows – oracle11.dll locked

Today I wanted to patch an Oracle 11.2.0.4 DB running on Windows. Shut down Oracle, listener and then stopped all services.
Fired up opatch and got this error:

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

Following files are active :

E:\oracle\product\1120~1.4\db1\bin\oracell11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraasmclnt11.dl
 E:\oracle\product\1120~1.4\db1\bin\orapls11.dll
 E:\oracle\product\1120~1.4\db1\bin\orageneric11.dl
 E:\oracle\product\1120~1.4\db1\bin\oraclient11.dll
 E:\oracle\product\1120~1.4\db1\bin\oracommon11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraplp11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraxml11.dll
 E:\oracle\product\1120~1.4\db1\bin\orannzsbb11.dll
 E:\oracle\product\1120~1.4\db1\bin\orazt11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraztkg11.dll
 E:\oracle\product\1120~1.4\db1\bin\oran11.dll
 E:\oracle\product\1120~1.4\db1\bin\orantcp11.dll
 E:\oracle\product\1120~1.4\db1\bin\oranl11.dll
 E:\oracle\product\1120~1.4\db1\bin\orancrypt11.dll
 E:\oracle\product\1120~1.4\db1\bin\orahasgen11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraocr11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraocrb11.dll
 E:\oracle\product\1120~1.4\db1\bin\oraocrutl11.dll

Interesting as none of my Oracle services are up.
Found a blog post saying that some other Windows services keep holds on those files and to find them you can use Resource Monitor (original post at https://soyucevista.wordpress.com/2015/07/29/prerequisite-check-checkactivefilesandexecutables-failed-error-error-code-73-opatch-in-windows-server-2008/):
Using the tool “Resource Monitor”, go to CPU -> select all the Process -> in “Associate Modules”, search the DLLs file and find the “image” that is using those files, if you kill the process those file will be released.

This didn’t work for me. I found no processes with the Oracle dlls. Time for a reboot.
First make sure *ALL* your Oracle services are set to Disabled and not Automatic:

Once done you can reboot to release the locks and continue with your patching. Don’t forget to re-enable them afterwards.

Leave a Reply