July 8, 2010 at 6:25 am
Hi frnds
i have SQL server 2005 Enterprise edition 64 bit
i m getting deadlock but not able to find out which query is deadlocking which one?
trace flag 1222 errorlog is attached here(open it in wordpad for better understanding)
kindly help me to find out queries causing deadlock !!!
Sanket Ahir
Don't run behind the success, Try to be eligible & success will run behind u......
July 8, 2010 at 8:06 am
have you run a trace?
July 8, 2010 at 8:43 am
Looks like you're getting deadlocks due to the SELECT, EXEC, INSERT...SELECT process that both queries are running. Each one could put shared locks on identical rows in the initial select statement. I'd do one of two things, maybe both things, experiment to be sure. First, you should wrap these statements in a transaction. Second, you might want to try adding a UPDLOCk statement to the SELECT statements to ensure that you're holding the rows as needed prior to running the data modification, especially the inner EXISTS select statement. I think that's the problem child.
That's my first blush impression.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply