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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL and lock

Re: PL/SQL and lock

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 12 Jun 2001 18:42:12 +0200
Message-ID: <tichf0rpp7g77c@beta-news.demon.nl>

"Marco Sarti" <marco.sarti_at_plangroup.it> wrote in message news:9g5fcf$tls4$1_at_news01.it.net...
> Oracle 8.0.6
>
> I need to write a PL/SQL procedure that should be executed simultaneously
 by
> more than one users.
> This procedure needs to take a unique progressive number from a numerator
> table. It makes a select for update and an update on this row table. This
> means that the resource is looked until the transaction is commited; in
> other words, an execution instance locks any other until it is finished.
> I only need that the number selected is unique, I do not need to avoid
> "holes".
> When I wrote the procedure in a client application (PowerBuilder) I uses a
> separate transaction taking this numerator and I committed it each time. I
> don't know if it is possible in a PL/SQL procedure (or if an alternate
> solution exists...).
> PS: I cannot use sequences.
>
>
>

Please explain why you can't use sequences. Sequences *work*, and your mechanism is likely to become a nightmare.

Regards,

Sybrand Bakker, Oracle DBA Received on Tue Jun 12 2001 - 11:42:12 CDT

Original text of this message

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