solving sql server problems for millions of dbas and developers since 2006



SQL Server DBA Tips SQL Server Developer Tips SQL Server Business Intelligence Tips SQL Server Career Tips SQL Server Whitepapers SQL Server Tools SQL Server Webcasts SQL Server Questions and Answers SQL Server Questions and Answers













Error 40001(1205)

Asked 2/13/2012 5:27:02 PM by Ankit shah

I am working on this Error 

"Error 40001(1205) : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

Any Idea how to solve this please/

Thanks



Answered 2/13/2012 8:09:50 PM by Jeremy Kadlec (0) vote answer is useful vote answer is NOT useful

Ankit,

I would review this tip - http://www.mssqltips.com/sqlservertip/1036/finding-and-troubleshooting-sql-server-deadlocks/ for an explanation of the SQL Server deadlock issue.

I would review these tips for a solution - http://www.mssqltips.com/sql-server-tip-category/61/locking-and-blocking/.

HTH.

Thank you,
Jeremy Kadlec


Answered 2/29/2012 9:46:06 AM by Ankit Shah (0) vote answer is useful vote answer is NOT useful

THanks Jeremy..

Here is my situation:

the front end users some times getting this error "Error 40001(1205) : Transaction (Process ID) was deadlocked on resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

SO by the time when i get messge and check in error log i can find deadlock details but nothing is bad happening even also . 

Any solution how to avoid this error at front end user side?


Answered 2/29/2012 3:17:53 PM by Jeremy Kadlec (0) vote answer is useful vote answer is NOT useful

Ankit,

To correct the error and prevent the issue all together, I would reference the resources I provided.

To display a more user friendly error message, I would revisit the error handling in your front end code and see how you can return a more user friendly message to the users.

Thank you,
Jeremy Kadlec



Post an Answer

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email   Notify for updates
Comments
*Enter Code refresh code


 
Sponsor Information
"SQL doctor is the best SQL product on the market, by far. All of Idera's tools are great, but this is the icing on the cake!"

SQL Monitor – For database professionals who need results on Day One. Try it online.

Need SQL Server help and not sure where to turn? Reach out to the Edgewood experts for a Health Check starting at $995.

Free Trial: Get Proactive Insight with Spotlight® for SQL Server Enterprise.

Solving SQL Server problems for millions of DBAs and Devs since 2006. Join now.

Learn SQL Server 2012, Performance Tuning, Development, Administration, Replication and more - free webcasts


Copyright (c) 2006-2012 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups
Some names and products listed are the registered trademarks of their respective owners.


Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com