Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

setQueryTimeout() stopped working after upgrade from 10g to 11g

mpapeschJun 4 2013 — edited Oct 15 2014
Hi,

we are upgrading our database server from Oracle 10g to 11g and are experiencing a strange problem: the JDBC statement <tt>cancel()</tt> and <tt>setQueryTimeout()</tt> methods no longer work.

Starting out with the information given in [1,2], what we found out so far is that there seems to be a combination of a different behavior of the database and some kind of network issue.

While 10g accepted the <tt>cancel()</tt> request and promptly answered with the corresponding <tt>ORA-01013</tt> (user requested cancel of current operation), 11g seems to try and contact the client for a confirmation of the cancellation.

If the client is in the same subnet as the database server everything works as expected.

If, however, the client is in a different subnet, this request from the database server does not make it back to the client through the firewall.

Right now we are kind of stuck and any help, reference to documentation, workarounds and questions are greatly appreciated.

I'll be glad to gather and provide further information.


Thanks in advance,

Matthias


[1] http://stackoverflow.com/questions/2376615/how-is-oracles-jdbc-query-timeout-implemented
[2] http://blog.tanelpoder.com/2010/02/17/how-to-cancel-a-query-running-in-another-session/

Comments

Solomon Yakobson
Answer
select  to_char(trunc(entry_date,'MM'),'MM YYYY),
        sum(qty) qty
  from  your_table_name
  group by trunc(entry_date,'MM')
  order by trunc(entry_date,'MM')
/

SY.

Marked as Answer by SANPAT · Aug 9 2022
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 25 2013
Added on Jun 4 2013
3 comments
621 views