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: Stopping an PL/SQL procedure

Re: Stopping an PL/SQL procedure

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Thu, 09 Sep 1999 13:27:09 -0400
Message-ID: <37D7EDED.8D88D407@Unforgettable.com>


"Pål Jakobsen" wrote:

> Thank you for answering - I am sorry I forgot to tell. The PL/SQL procedure
> is named "termin" and exists in a package "terminprocedure".
>
> I execute it from the prompt in sqlplus with the command execute
> terminprocedure.termin; - then it seems to go into an endless loop
> somewhere. I need to force it to stop without shutting the database down.
>
> Thank you.
>
> Kenneth C Stahl wrote in message <37D7A1B0.F5A04139_at_Unforgettable.com>...
> >"Pål Jakobsen" wrote:
> >
> >> I am debugging an PL/SQL procedure which sometimes goes wild. How can I
> stop
> >> this. I have tried to stop the session in the instance manager but this
> >> don´t help. Is there any command to use to stop the procedure from
> running
> >> immidiately.
> >>
> >> Thanks
> >
> >You need to supply more information than this. I use pl/sql all the time
> and I
> >can always stop it when needed, but then I'm working under a specific set
> of
> >circumstances.
> >
> >What you have not told us is how you are running the pl/sql. Are you
> running it
> >as a script from within sqlplus? Are you executing a stored procedure from
> >within sqlplus? Are you running a pl/sql block from a Pro-C program running
> on
> >the host? Are you running a pl/sql block from a Pro-C program running on a
> >client? Are you running  a pl/sql block from an OCI program? Are you
> running a
> >pl/sql block from a client application such as Visual Basic or Visual C++?
> This
> >type of information is absolutely required in order to identify what
> methods can
> >be used to stop the pl/sql from running once started.
> >
> >

If you are on a UNIX box then as long as you know what your stty setting for INTR is, it should work. You might also want to include WHENEVER SQLERROR EXIT FAILURE immediately before you execute the pl/sql block.

If you are running this in the background then you should be able to just send a SIGTERM to the process.

If you are not on UNIX and perhaps using the DOS version of sqlplus from Windows 95/98 then make sure you have "SET BREAK ON" either in your autoexec.bat or the link that you use to run sqlplus. If you don't do then then break is set to off by default and ctrl-c will not work.

I don't know if the same thing applies to Windows NT. Maybe there is an NT specialist in the NG that knows.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Received on Thu Sep 09 1999 - 12:27:09 CDT

Original text of this message

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