March 17, 2008 at 1:26 am
Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction even using with(nolock) option in select query
HI got the above error in production site during high load .When SQL Server2005 used one select query with some joins in it and all table with nolock hint.
I am looking for some best solutions to avoid those errors .
March 17, 2008 at 4:40 am
We had similar problems at a job I worked. Basically we had a third party software that the dev manager was impatient with the software producer. So he wrote his own applications against the db. Eventually the db hit a critical mass of usage, vs changes, vs triggers to contain the business logic.
Turns out the software in question always wrote data to tables in a consistent table order, found using profiler. Efforts were taken in development to make sure that all triggers and code followed the same order of inserts and updates to minimize the possibility of deadlocks. If you use the Profiler tool during these periods of deadlock you should be able to narrow down the processes in question that are causing the problem. Work out the data flow for these processes and you should be able to find your major culprit.
September 15, 2008 at 11:48 pm
The tips to resolve this type of errors can be found in this link.
Can you please tell me that how can I identify during the production that which process caused the deadlock?
Regards,
Gourav
September 16, 2008 at 2:56 am
Enable traceflag 1222 (DBCC TRACEON (1222.-1))
With that on, a deadlock graph is written to the error log when a deadlock occurs. You can read through the graph to see what processes were involved in the deadlock, what they were doing and what resources they were deadlocked over.
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
September 16, 2008 at 3:03 am
Hi,
Thanks for the reply but my concern is that the dead lock occured yesterday and I need to answer my client that which process caused the deadlock then how can I find it?
Thanks in advance
Gourav
September 16, 2008 at 3:07 am
Unless you had one of the traceflags on or a profiler trace running with the deadlock events, there's no way to tell now what happened.
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
July 27, 2010 at 11:28 pm
"transaction(Process ID 59) was deadlocked on lock resources with another process and has been choosen as the deadlock victim.Return the transaction"
I got the above error in production site during high load Iam using sqlserver 2005 , i dont have sql profiler, what would be the problem , When i restart the Sql service ,application works smothly please Help me out of this Situation ….
July 27, 2010 at 11:34 pm
Please post your question in a new thread. Thank you.
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
January 10, 2011 at 3:16 am
SET DEADLOCK_PRIORITY { LOW | NORMAL | HIGH }
I resolve same problem with this command.
May 2, 2013 at 8:04 pm
After running the syntax
"SET DEADLOCK_PRIORITY NORMAL;
GO'
Did the error go away permanently?
June 25, 2018 at 4:30 am
Hi i had faced the same problem as query was taking lots of time to give the results and ending up in deadlock. I have used "SET DEADLOCK_PRIORITY NORMAL;" before the select query and deadlock error is gone now. The Query still take lots of time to execute but it is giving me the result
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply