RE: Using custom application locks
Date: Fri, 27 Mar 2009 11:46:59 -0400
Message-ID: <23C4836D8E9C5F4280A66C0C247BC16F261A8A6A_at_US-BOS-MX011.na.pxl.int>
Amar,
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
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Amar Padhi
Sent: Thursday, March 26, 2009 4:11 PM
To: oracle-l_at_freelists.org
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.
http://www.amar-padhi.com/oradb_application_lock.html
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