June 17, 2009 at 3:58 am
Hi,
I have created a trigger for insert which will be triggered by the Maintable table. Whenever a record is inserted into this table, the trigger process will have to be invoked to transfer the records into childtable1 and childtable2 table and then delete the records
from Maintable table.
Since multiple applications will be running concurrently multiple records may be inserted into the Maintable table at the same time from different Application modules. Queuing, locking and synchronization of this process is very important.....
I dont have any idea about queuing, locking and synchorization in sql server 2005 to avoid the collision while insertion....
Please give me some abstract idea of how to apply it for the above trigger process....
Pls help me...
tnx in advance
with regards,
anand
June 17, 2009 at 4:16 am
Hi Anand
What are you trying to achieve by creating a duplicate rows for all the values that u have on some tables.
July 15, 2009 at 10:46 am
In case you haven't , my recommendation is to learn on BOL about ISOLATION. Then also look at the indexes and tune those.
----------------------------------------------------
July 16, 2009 at 8:25 am
All of the locking and such will be automatically handled by sql server. Indexing will be key to efficient delete of the maintable rows, which will be critical to avoiding blocking.
Other than that, make sure you code the trigger to handle multiple rows. Not doing so is a VERY common mistake!!!
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply