Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: How do you use DBMS_LOCK?
dbms_lock.sleep() has many uses.
Many moons ago I had the requirement to ensure only one instance of a = specific process be run at any given time (oracle 73, forms, plsql = packages). The only way I could implement that was using a named lock = and having process wait to acquire the lock. If successful, it would = run, else it would spin for some time and try again to a threshold and = then even if it fails, complain loudly and fail.
It would have been difficult to implement that without lock ...=20
Raj
-------------------------------------------------------------------------=
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Ryan
Sent: Saturday, February 14, 2004 9:50 AM
To: oracle-l_at_freelists.org
Subject: How do you use DBMS_LOCK?
Tom Kyte has a use for it in his book. You create your own Insert Lock. =
I used it once last year. All I did was create a wrapper to make it =
easier for others to use it. I was just a contractor there so I didnt =
get the big picture.=20
What have you used DBMS_LOCK for? Anything interesting any useful? =
Anyone have any code samples? I've used locks in java and unix when I do =
threading, I have not seen much cause for it inside the Oracle database. =
![]() |
![]() |