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: Exclusive (non-reentrant) Stored Procedure

Re: Exclusive (non-reentrant) Stored Procedure

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 29 Dec 2000 10:55:25 -0000
Message-ID: <978087580.19352.3.nnrp-08.9e984b29@news.demon.co.uk>

If this is to ensure that two separate sessions do not run the same procedure at the same time then your best bet is probably to look at the DBMS_LOCK or UTL_LOCK packages. These expose the mechanisms used by Oracle for its own locking purposes.

In particular, they cover the need to release on unexpected termination of the process.

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases

Publishers:  Addison-Wesley
See a first review at:
http://www.ixora.com.au/resources/index.htm#practical_8i
More reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



dejaschirf_at_my-deja.com wrote in message <92alie$li7$1_at_nnrp1.deja.com>...

>I need to create a stored procedure that is, in effect, not reentrant.
>What I’d like to have happen is for any calls to the stored procedure
>which occur while it is already running to immediately return as if
>they had run successfully. I’ve looked for a semaphore mechanism in
>Oracle but have had no luck finding a way to create a resource lock
>that will unlock automatically on unexpected termination.
>
>Can anyone help me with this?
>
>Paul Schirf
>Frustrated Oracle Developer
>
>
>Sent via Deja.com
>http://www.deja.com/
Received on Fri Dec 29 2000 - 04:55:25 CST

Original text of this message

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