Database Administration (MOSC)

MOSC Banner

'dbms_lock.allocate_unique'

edited May 22, 2012 3:41AM in Database Administration (MOSC) 3 commentsAnswered
Hi,
   My customer plans to make use of the 'dbms_lock' package to manually apply locks to certain tables. Unfortunately, when he uses  the 'allocate_unique' procedure to associate a number (handle) with the named lock he does not know how long he will need that lock for. He therefore sets parameter 'expiration_specs' to a large number.

   Subsequently, when he has finished with that lock, he calls 'dbms_lock.allocate_unique' with the same lock name but setting parameter 'expiration_specs' to 0. This seems to have the effect of disassociating the generated number from the lock name, thus enabling the normal mechanism to tidy up the 'dbms_lock_allocated' table, but I have 2 questions:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center