How to Solve Dead Lock problem in Sql Server 2005 Question
-
Hi all, I am using Visual Studio 2008 and Sql Server 2005 I am use some CLR Programming in my windows application and it goes fine. But I got Some Error during Transaction in my application. Error : Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. So, What is the Problem and How Can I Solve this Type of Problem. Thanking you very much.
Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)
-
Hi all, I am using Visual Studio 2008 and Sql Server 2005 I am use some CLR Programming in my windows application and it goes fine. But I got Some Error during Transaction in my application. Error : Transaction (Process ID 55) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. So, What is the Problem and How Can I Solve this Type of Problem. Thanking you very much.
Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)
For deadlock descriptoin, see: - http://en.wikipedia.org/wiki/Deadlock[^] - Deadlock[^] In order to prevent a deadlock you must for example ensure that operations (and lock acquisitions) are executed in the same order, everywhere. This won't prevent all situations, but the amount will be much smaller.
The need to optimize rises from a bad design. My articles[^]
-
For deadlock descriptoin, see: - http://en.wikipedia.org/wiki/Deadlock[^] - Deadlock[^] In order to prevent a deadlock you must for example ensure that operations (and lock acquisitions) are executed in the same order, everywhere. This won't prevent all situations, but the amount will be much smaller.
The need to optimize rises from a bad design. My articles[^]
In your code check the exception, if it is sql exception, then instead of skipping the control, stop the process for some time and call the same functionality once again, by the time, other process will finish it's work and release the data, then you process will continue
ch sriniw8z
-
In your code check the exception, if it is sql exception, then instead of skipping the control, stop the process for some time and call the same functionality once again, by the time, other process will finish it's work and release the data, then you process will continue
ch sriniw8z
I suppose you didn't actually want to answer my post, but the original question. When answering a question (or another post), press reply on the post which you want to answer or comment.
The need to optimize rises from a bad design. My articles[^]
-
For deadlock descriptoin, see: - http://en.wikipedia.org/wiki/Deadlock[^] - Deadlock[^] In order to prevent a deadlock you must for example ensure that operations (and lock acquisitions) are executed in the same order, everywhere. This won't prevent all situations, but the amount will be much smaller.
The need to optimize rises from a bad design. My articles[^]
True Dat! Easy to implement when the DB is new and there aren't that many queries, sps, etc. On an existing database with alot of objects, little hard to implement. Lack of fore thought will kill you later on a large database with deadlocks/delaylocks.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison
-
True Dat! Easy to implement when the DB is new and there aren't that many queries, sps, etc. On an existing database with alot of objects, little hard to implement. Lack of fore thought will kill you later on a large database with deadlocks/delaylocks.
Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison