Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: When I hold Locks via dbms_lock
On Mar 1, 2:57 pm, "Ed" <e..._at_mail.com> wrote:
> When I hold locks via dbms_lock.request
> and I subsequently hit an exception....are the Locks released automagically
> by Oracle ?
>
> thanks
> 10gR2
You can code them to release on commit/rollback .. or when the session exits.
Something like this:
dbms_lock.allocate_unique(lockname => 'XXXXXXXXX', lockhandle => :v);
dbms_lock.request(lockhandle
=> :v,lockmode=>dbms_lock.X_mode,timeout=>60,release_on_commit=>true);
Anurag Received on Thu Mar 01 2007 - 14:04:23 CST
![]() |
![]() |