RE: Using custom application locks

From: Goulet, Richard <>
Date: Fri, 27 Mar 2009 11:46:59 -0400
Message-ID: <>


    There is a much simpler way that Oracle has provided for some time now called DBMS_LOCK. It creates a byte or so of memory in the SGA that is called a User Defined Lock or UDL. I've used that package in the past to coordinate a number of processes and it works absolutely great, even if the process holding the lock dies unexpectedly.  

Dick Goulet  

[] On Behalf Of Amar Padhi Sent: Thursday, March 26, 2009 4:11 PM
Cc:;;;;;; Amar Padhi Subject: Using custom application locks

This thread is started to explain creation of custom application locks to handle serialization of a process or set of processes across multiple commits. This was debated in another thread as not being reliable (thread with subject "Grabbing sequence values blocks in consecutive order: Need a guaranteed method."). I just quickly wrote and posted some sample code at below link to show how this method works. You can try running it against your cases and let me know if this fails to deliver.

All comments welcome. Thanks.

Amar Kumar Padhi
Oracle DBA/Architect

Received on Fri Mar 27 2009 - 10:46:59 CDT

Original text of this message