Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How do you use DBMS_LOCK?

RE: How do you use DBMS_LOCK?

From: Jamadagni, Rajendra <Rajendra.Jamadagni_at_espn.com>
Date: Sun, 15 Feb 2004 10:09:50 -0500
Message-ID: <A186CBDC8B1D61438BC50F1A77E91F73057C1973@xchgbrsm1.corp.espn.pvt>


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
-------------------------------------------------------------------------=



Rajendra dot Jamadagni at nospamespn dot com All Views expressed in this email are strictly personal. select standard_disclaimer from company_requirements; QOTD: Any clod can have facts, having an opinion is an art !

-----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. =



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Sun Feb 15 2004 - 09:09:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US