Over the holiday break I took the opportunity to apply the latest RU to some of my databases.

On my 21c Windows instance, as I was running “opatch apply” I got the following error:



X:\tmp\36878842>opatch apply
Oracle Interim Patch Installer version 12.2.0.1.44
Copyright (c) 2025, Oracle Corporation.  All rights reserved.


Oracle Home       : c:\oracle\product\21
Central Inventory : C:\Program Files\Oracle\Inventory
   from           :
OPatch version    : 12.2.0.1.44
OUI version       : 12.2.0.9.0
Log file location : c:\oracle\product\21\cfgtoollogs\opatch\opatch2025-01-07_10-45-57AM_1.log

Verifying environment and performing prerequisite checks...

(snip)

Patching component oracle.assistants.deconfig, 21.0.0.0.0...

Patching component oracle.jdk, 1.8.0.291.09...

Copy failed from 'X:\tmp\36878842\files\jdk\bin\java.exe' to 'c:\oracle\product\21\jdk\bin\java.exe'...
Please verify all applications associated with the Oracle Home 'c:\oracle\product\21' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on https://myoraclesupport.oracle.com.

Now many of you that have applied patches in the past will probably be familiar with the issue of not being able to overwrite a file on Windows that is in active use.

So I double-checked my running processes, check my PATH settings, shutdown more stuff and even rebooted the machine … but the error persisted!

It turns out, it had nothing to do with running processes (well it did – more on that in a second), it was because I took a shortcut.

I had already patched by 23ai instances so I figured I would just use the 23ai version of opatch for the 21c instance. After all, most of us always just go download the latest version of opatch to do our patching. That was a mistake…

But…. things have changed in 23ai. We’ve made opatch more streamlined, which means it does not come bundled with a full java runtime.

As a consequence, when I was running 23ai opatch against my 21c instance, it found the existing java runtime within the 21c ORACLE_HOME and used that. Hence the files were in active use when the patching process wanted to overwrite them.

Moral of the story #1:

Yes, go ahead and download the latest opatch version but for your major database release number.

Moral of the story #2:

Just use autoupgrade to take the complexity out of it.

Got some thoughts? Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trending