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: Powell, Mark D <mark.powell_at_eds.com>
Date: Mon, 16 Feb 2004 10:07:48 -0500
Message-ID: <564DE4477544D411AD2C00508BDF0B6A1CE0A9ED@USAHM018.amer.corp.eds.com>


DBMS_LOCK is very useful to single thread batch or online processes that should not be ran concurrently. Any operation where multiple people have the ability to trigger the event, but the event should happen only once and the process data would appear to both user sessions as available for processing is a candidate to be protected by a USER lock. If the application requests the lock on startup and finds it in use it terminates because the task is already running. If the lock is not in use, i.e.. it is granted, then the job runs.

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

-----------------------------------------------------------------
----------------------------------------------------------------
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 Mon Feb 16 2004 - 09:07:48 CST

Original text of this message

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