10gR2 EE (10.2.0.3.0) /Solaris
what is the "best" option to abort a running stored proc, dbms_pipe ?
thanks
fitzjarrell@cox.net - 21 Sep 2007 20:21 GMT
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> what is the "best" option to abort a running stored proc, dbms_pipe ?
>
> thanks
Is a procedure in the dbms_pipe package what you want stopped? Or are
you asking if dbms_pipe is the package to use to perform such a task?
If it's the latter your question makes very little sense.
David Fitzjarrell
userjohn - 25 Sep 2007 21:46 GMT
<fitzjarrell@cox.net> wrote in message
> Is a procedure in the dbms_pipe package what you want stopped? Or are
> you asking if dbms_pipe is the package to use to perform such a task?
> If it's the latter your question makes very little sense.
No no, it is NOT "procedure in the dbms_pipe package" that I want to
stop/abort/terminate,
not Oracle packages. (LOL)
It is USER/MY stored procedure in pkg that I want to be able to
stop/abort/terminate
FROM ANOTHER SESSION WHILE IT'S RUNNING
I looked further into it and as Connor suggeste, dbms_alert serves this
purpose.
zigzagdna@yahoo.com - 22 Sep 2007 01:16 GMT
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> what is the "best" option to abort a running stored proc, dbms_pipe ?
>
> thanks
You are proably asking if a stored procedure is running and takes long
time, you want to kill it. I guess you can kill
the process or session running the stored procedure.
ErikYkema - 22 Sep 2007 20:49 GMT
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> what is the "best" option to abort a running stored proc, dbms_pipe ?
>
> thanks
As the other respondents made clear, your requirement is a little
vague. Perhaps you may like to use the timeout parameter of
DBMS_PIPE.RECEIVE_MESSAGE (see e.g.
http://www.cs.umbc.edu/help/oracle8/server.815/a68001/dbms_pip.htm#1003366)
and in case the call to this function then returns with return value
equals 1, you could e.g. raise an exception in the calling pl/sql
body, effectively stopping the "running stored procedure" or do
something else. Good luck and let us know how you are tackling this.
You may also benefit from dbms_alert, I am not sure whether dbms_pipe
is deprecated - for some reason it is not in DA Morgan's library.
Regards, Erik Ykema
John K. Hinsdale - 22 Sep 2007 21:20 GMT
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> what is the "best" option to abort a running stored proc, dbms_pipe ?
If your aim is to kill off "runaway" procedures, you can
set it up to run under an Oracle user w/ a profile that
limits the CPU in a session. See:
http://www.psoug.org/reference/profiles.html
Of course that will kill off the session, not just the
stored proc, which may be less graceful than what you want.
But at least it will happen (eventually) in an automatic
way. Your other option as mentioned by others is to kill
off the session manually w/ ALTER SYSTEM KILL SESSION
John Hinsdale
Connor McDonald - 25 Sep 2007 13:48 GMT
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> what is the "best" option to abort a running stored proc, dbms_pipe ?
>
> thanks
I'm guessing you are using the stored proc as some sort of daemon
process. If that's the case, then dbms_pipe, dbms_aq or dbms_alert all
work without too much fuss.

Signature
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions"
Co-author: "Oracle Insight - Tales of the OakTable"
web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald@yahoo.com
"Semper in excremento, sole profundum qui variat."
------------------------------------------------------------
Palooka - 29 Sep 2007 19:19 GMT
"Connor McDonald"
>> 10gR2 EE (10.2.0.3.0) /Solaris
>>
[quoted text clipped - 5 lines]
> process. If that's the case, then dbms_pipe, dbms_aq or dbms_alert all
> work without too much fuss.
I've used dbms_pipe for years for this type of thing. Lightweight, and works
with all versions.
Palooka