RE: Using custom application locks
Date: Fri, 27 Mar 2009 11:46:59 -0400
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.
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Amar Padhi Sent: Thursday, March 26, 2009 4:11 PM
Cc: fmhabash_at_gmail.com; riyaj.shamsudeen_at_gmail.com; mark.bobak_at_proquest.com; afatkulin_at_gmail.com; kutrovsky.oracle_at_gmail.com; jkstill_at_gmail.com; 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 www.amar-padhi.com -- http://www.freelists.org/webpage/oracle-lReceived on Fri Mar 27 2009 - 10:46:59 CDT