Cancelling Long Running Queries with 11g JDBC Thin Driver

(Doc ID 850511.1)

Last updated on MAY 31, 2018

Applies to:

JDBC - Version 11.1.0.6 and later
Information in this document applies to any platform.

Goal

With the introduction of the 11g JDBC driver calling Statement.cancel() will actually cancel a long running query where in 10g JDBC Driver this would not work. Now with the 11g JDBC driver the cancel request is sent out of band. The out-of-band implementation may allow the database server to process the request immediately and terminate the system call that would otherwise block the query. This database feature is operating system dependent and may not work on all platforms.

For more information on this please see:
<Note 552275.1> - Problem Canceling Locking Queries Using JDBC/thin and setQueryTimeout

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms