Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to ensure only one session runs PL/SQL proc at a time?

Re: How to ensure only one session runs PL/SQL proc at a time?

From: Ian Ledzion <ian.ledzion_at_lgxbow.com>
Date: Fri, 24 Aug 2001 09:36:19 +0200
Message-ID: <9m507a$ge3$1@rex.ip-plus.net>


You're right about the constant, but it's just that a numeric constant is less easy to manage than a string. allocate_unique returns a number (which will be sent to the request and release functions) from a string.

Would you rather manage a lock number 10737418251073741825148 or its string source, 'FOO'?

"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:998635782.28060.0.nnrp-02.9e984b29_at_news.demon.co.uk...
>
> Why do you need allocate unique ?
>
> If you want to allow just one copy of the
> procedure to run at a time, shouldn't you have
> a constant associated with the procedure ?
>
> --
> Jonathan Lewis
>
> Host to The Co-Operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
> Author of:
> Practical Oracle 8i: Building Efficient Databases
> See http://www.jlcomp.demon.co.uk/book_rev.html
>
> For latest news of public appearances
> See http://www.jlcomp.demon.co.uk
>
> Screen saver or Life saver: http://www.ud.com
> Use spare CPU to assist in cancer research.
>
>
>
>
> Ian Ledzion wrote in message <9m4si1$fop$1_at_rex.ip-plus.net>...
> >Tested dbms_lock, and it works fine. Only problem I've had is that I
can't
> >use it from a trigger as the allocate_unique procedure issues a commit.
> >
>
>
>
Received on Fri Aug 24 2001 - 02:36:19 CDT

Original text of this message

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