A kill-switch terminates blocking sessions during patching

You will find a good number of datapatch posts on my blog. And with Oracle AI Database 26ai from RU 23.26.0.0.0 onward (the October 2025 RU), we introduce a new functionality when you run datapatch: A kill-switch terminates blocking sessions during patching.

A kill-switch terminates blocking sessions during patching

Photo by Yuko Tanaka on Unsplash

What is changing?

From Oracle AI Database 26ai onwards by default the invocation of datapatch will terminate any session currently holding a requested KGL X lock (Kernel Generic Library cache), an exclusive lock on an SQL or an PL/SQL procedure.

In reality this means:

  1. You invoke datapatch without any additional options
  2. A session holding an exclusive lock on an PL/SQL package, e.g. DBMS_STATS, will be terminated. The idea is to prevent critical operations such as schema changes or object recompilation from being stopped. It should prevent datapatch from being sent into timeout loops, or even failing after a while.

This new behavior is described in MOS Note: 1585822.1 – Datapatch: Database 12c or later Post Patch SQL Automation under “force_terminate_blocking_sessions“.

Since datapatch is only a wrapper, underneath the covers this new default option instructs catcon to terminate any session currently holding the requested KGL X lock, using a kill_kgl_x_blocker flag. It will kill non-fatal background processes. For instance, MMON is not a fatal background. In case it is holding an X lock, it is liable to be terminated.

 

When will it be enabled?

This is the new default behavior from Oracle AI Database 26ai onward, the October 2025 Release Update (RU) 23.26.0.0.0.

 

Can you turn it off?

Yes, of course, you can. But you need to pass on an extra option into datapatch in this case.

Simply call datapatch this way:

./datapatch -force_terminate_blocking_sessions false

The “false” flag will disable the termination of sessions holding this exclusive lock. In this case, datapatch will behave as it did before in older releases. But you need to call it this way all the time since it does not memorize it.

 

Can you turn it on in Oracle Database 19c?

Currently, this new default behavior applies to Oracle AI Database 26ai only. Therefore, when you are going to patch your current Oracle Database 19c databases, you will not see this feature being on. But in case you desire to use it – and feel free to try it out – you can invoke it by calling datapatch either:

./datapatch -force_terminate_blocking_sessions

or:

./datapatch -force_terminate_blocking_sessions true

Of course, you can combine it with the -verbose option, too, which is not needed anymore but deeply engraved into my own muscle memory when I type.

 

When will it be the default in Oracle Database 19c?

There were plans to enable this with the January 2026 Release Update, 19.30.0. But we decided to postpone the default change in 19c. Therefore, no changes, and nothing you need to check for right now. Still, the feature exists with 19.30.0, and you can enable it at your will.

If you do so, i.e. using ./datapatch -force_terminate_blocking_sessions true then please let me know about your experience.

 

Further Links and Information

–Mike