How to fix deadlock condition in my SQL Server?

Asked By 0 points N/A Posted on -
qa-featured

I am a newbie in using SQL Server. I just encountered this problem when I tried to run multiple SSIS packages upon the server. It has a deadlock condition which I totally don't understand. What is a deadlock condition and howto fix it?

SHARE
Best Answer by Mclean Buono
Answered By 0 points N/A #168462

How to fix deadlock condition in my SQL Server?

qa-featured

Hello Torin,

A deadlock is a condition where 2 (or more) processes try to access other resources to carry insurance. Because each process has a request for the resources other process can be completed. When detected deadlock, SQL Server rolls back the transaction that have less processing time and returns an error message 1205 to the application. Error message 1205 terminates the current batch and moving back the current transaction.

Thanks

Patrick Opal

Best Answer
Best Answer
Answered By 10 points N/A #168463

How to fix deadlock condition in my SQL Server?

qa-featured

Hello Torin,

A deadlock is general problem in databases in which two or more threads or processes are blocking each other and are each is waiting for the other to complete.

Once a deadlock has been detected, the deadlock manager in the database engine ends the deadlock by choosing one of the threads as the victim. In case of SQL Server, one of the threads is terminated, its transaction is rolled back and error 1205 is returned to the application.

Deadlocks do not occur due to a bug in SQL Server, but they happen due to the way application code has been written. So a few tweaks to the application code is sometimes enough to prevent deadlocks.

Whenever a deadlock occurs, check SQL server logs to for more information about the queries and the tables or indexes that were involved.

Hope this helped.

Regards,

Mclean Buono

Login/Register to Answer

Related Questions