Locking a table before doing an Insert.....Pls help [message #328826] |
Mon, 23 June 2008 00:11  |
gangulyz
Messages: 6 Registered: April 2008
|
Junior Member |
|
|
Hi
Here's my problem ,
We have 4 processes running at the same time that inserts data into a common table. Currently we are facing concurrency problem regarding the data insert as duplicate records are being inserted.
We want to implement a locking mechanism such that only one process can insert the data into the table any given time.
Should I go for an explicit locking ? or Is there a better way to achieve the goal through PL/SQL?
any help is greatly appreciated.
Regards
Som
|
|
|
|
|
|
|
Re: Locking a table before doing an Insert.....Pls help [message #329003 is a reply to message #328826] |
Mon, 23 June 2008 12:40   |
 |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
gangulyz wrote on Sun, 22 June 2008 22:11 | Hi
Here's my problem ,
We have 4 processes running at the same time that inserts data into a common table. Currently we are facing concurrency problem regarding the data insert as duplicate records are being inserted.
We want to implement a locking mechanism such that only one process can insert the data into the table any given time.
Should I go for an explicit locking ? or Is there a better way to achieve the goal through PL/SQL?
any help is greatly appreciated.
Regards
Som
|
>Locking a table before doing an Insert
Doing the above is a GREAT way to have a non-scalable application!
This problem results directly from a very flawed design.
Rather than attack the symptom, you should change the design to avoid this problem entirely.
[Updated on: Mon, 23 June 2008 16:09] by Moderator Report message to a moderator
|
|
|
|