Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL: How release row lock w/o COMMIT?
"Tobias Besch" <me_at_privacy.net> wrote in message
news:Xns94A4B971AF3F0tobiasbeschgmxde_at_ID-86573.user.dfncis.de...
> Is it possible in PL/SQL to lock a row and release the lock without
> doing a COMMIT?
>
> My problem is the following:
>
> I have a stored procedure proc1.
> proc1 executes a SELECT and an UPDATE.
> The affected row should be locked during the execution of proc1.
> The lock should be released when proc1 finished.
>
> When I call proc1 from within a larger transaction, I do not want
> that proc1 closes the transaction by doing a COMMIT.
>
> Example:
> Begin a large transaction.
> ...
> Call proc1 from somewhere inside this transaction.
> Continue the transaction.
> ...
> End the transaction with a COMMIT.
>
>
> Kindest Regards,
> Tobias
Investigate savepoint. You might also use dbms_lock package, but it would
require that othes use it.
Jim
Received on Sat Mar 06 2004 - 11:27:20 CST