Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Aborting PL/SQL
In article <8urmg6$2rj4a$1_at_ID-6634.news.dfncis.de>,
hennes_at_topmail.de wrote:
> Hi,
>
> is there any chance to abort a long running PL/SQL procedure by
another
> way than 'shutdown abort'? We have some very impatient customers,
> thinking the client hangs and then - without further thinking -
pressing
> ctrl-alt-del and quitting the client programme. The PL/SQL-routine
> allthough ist still running and is therefore holding locks on several
> tables.
>
> If it were possible, we could add an Abort button for them to kick the
> thread. No, we can't split the routine up to several small ones.
>
> Ah, almost forgotten: Oracle 8i EE Rel2 on Sun Solaris.
>
> Thanks in advance
> Ralf Jonas
>
From sqlplus you can abort pl/sql code with a control-c just as you can
a long running sql statement (assuming control-c is not trapped at OS
level by profile). Perhaps your application could send this command.
As an alternate it is possible to write a database stored procedure that can locate and kill sessions based on passed criteria such as Oracle username, OS user name, program being executed and other information in v$session. This routine could be called to perform the task.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue Nov 14 2000 - 10:41:15 CST