Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Does setQueryTimeout() work on Oracle Thin Driver (8.1.6)

Re: Does setQueryTimeout() work on Oracle Thin Driver (8.1.6)

From: Daniel J. Long <longdj_at_cat.com>
Date: Sat, 21 Jul 2001 21:23:58 GMT
Message-ID: <3B41BE5E.287CD83D@cat.com>

Hello,

Our Oracle DBAs created a stored procedure for me which I can use to terminate a runaway query. Presumably, the "kill session" stored procedure is manipulating some Oracle system tables to affect this. Unfortunately I don't have the details on that. From my view, I request a "session id", like this: "select userenv( \'sessionid\' ) from dual" (using the Connection which has the runaway query). Then I send this sessionid and the logonid to the kill_session sp (on a new Connection), which then cleans up my runaway. In order for this to work, you have to be able to identify which Connection object (from your pool, for example) has the runaway query on it.

I realize that the kill_session SP is the key. If you really need the details of that let me know.

Good luck!
Dan

dbianchi_at_square.nl wrote:

> In comp.lang.java.databases Pratap Das <reply_das_at_yahoo.com> wrote:
> > Could someone please validate that my above statement is correct? Or
> > is there some other way to "kill" a runaway Stored Procedure from a
> > Java program?
>
> AFAIK, the only way to stop a running SP is to shutdown the Oracle
> Instance.
>
> Davide
Received on Sat Jul 21 2001 - 16:23:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US