dbTalk Databases Forums  

dbms_lock question

comp.database.oracle comp.database.oracle


Discuss dbms_lock question in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nobody101
 
Posts: n/a

Default dbms_lock question - 03-15-2006 , 07:02 PM






Hello, I am trying to use DBMS_LOCK within an application to prevent two
users from doing a specific task at the same time.
The allocate_unique and request calls work just fine. However, If my
attempt to obtain a lock fails 'cause some other user
has acquired the lock, I want to know who that user is. I see where you can
look in V$LOCK for locks of type 'UL'.
But the "ID1" field maps to an internal value, not the "handle" value
returned by allocate_unique. Since v$lock has the SID value,
I can then look in V$Session for the user attributes. But this won't work
without somehow mapping the "external" handle from allocate_unique to the
"internal" id in v$lock. Any way to do this?


Thanks,
Leor



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.