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: Stop Executing an SQL

Re: Stop Executing an SQL

From: -=< a q u a b u b b l e >=- <aquabubble_at_Remove.No.Parma.Ham.Remove.geocities.com>
Date: Sun, 24 Oct 1999 00:34:16 +0100
Message-ID: <7utgmk$cv2$1@neptunium.btinternet.com>


Michael Kurz <Michael.Kurz_at_c-plan.com> wrote in message news:7ukg64$3kh$1_at_bnews.gigabell.net...
> > Michael Kurz wrote:
> >
> > > Hello
> > >
> > > How can I stop (break) the Executing an SQL
> > > ( SQL-Worksheet, SQL+ or ADO)
> > >
> > > I have to wait hour's till the execution is done........
> > >
> > > Is there an solution ?
> > >
> > > Why I want to do that:
> > > - I do an SQL that returns many Records and I want to stop the output
> > > - I Test an SQL but It's not optimized
> > > - Somebody (a bad user) executes an bad SQL.
> > >
> > > Thanx for an answer
> > > Micha
>
> Edorta <edortta_at_yahoo.es> schrieb in im Newsbeitrag:
> 380DA190.15C144ED_at_yahoo.es...
> > As far as I know (SQLPlus) you only have to press Ctrl-C to stop
> > execution.
> >
> Hello Edorta
>
> Thanx for the tip !
> It Works fine in SQLPlus.
>
> I need a way I can stop a select (or a user aktion) with ADO too.
> Is there a SQL Command to do that ????
>
> Many Thanx
> Micha

You cannot interrupt this kind of process using CTRL-C... You need to kill the process. You can find out what processes are running by querying the v$session and v$process tables. In here you can find the SID and SERIAL# of the relevant process. To kill that process you need to:

ALTER SYSTEM KILL SESSION '19,13'; (Here, 19 is the SID and 13 is the SERIAL#)

Depending on what resources are in use, it may take some time for the process to die. Any longer than 60 seconds (I think) and it will be marked for kill. Sometimes this process can take forever to die, in which case you have to resort to killing the O/S process in order to claw back your resources.

HTH Received on Sat Oct 23 1999 - 18:34:16 CDT

Original text of this message

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