March 22, 2012 at 4:09 am
I have one procedure which is run parallely multiple times to insert data into one table for different set of parameters. I can see my process getting deadlocked.
March 22, 2012 at 4:47 am
What about posting the code?
March 22, 2012 at 4:52 am
Not possible - there I am first selecting data from a big table to temporary table, then doing some updates and finally inserting it back to the main table. This all is happening using sp_executesql. Transaction is started in the beginning of procedure and committed at last.
March 22, 2012 at 4:55 am
Without the code and the deadlock graph it's impossible to give any useful advice.
Get the deadlock graph (via traceflag 1222 or via the extended events system health session), look at the the statements involved, look at the resources involved and based on that decide how you're going to proceed. Could be adding or widening indexes, could be changing code.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply