Thursday, March 29, 2012

deadlocks not resolved by SQL Server

I am under the impression that SQL Server would automatically detect a
deadlock and roll back a participating transaction. However, I have had a
few cases where automatic resolution did not occur. Instead, I had to go in
and manually kill the transaction that is causing a deadlock.
Is there anyway to avoid this? I don't want to have to manually kill a
transaction to unwind a deadlock if that's at all possible.
Thanks in advanceHi
It sounds like you have prolonged blocking rather than a deadlock, in which
case your query should timeout. Make sure that your application has
overridden the default timeouts and requested to wait indefinitely.
You should also investigate if you application has long running transactions
that have not been correctly committed/rolled back or if poor indexing is
affecting performance.
John
"C.W." wrote:

> I am under the impression that SQL Server would automatically detect a
> deadlock and roll back a participating transaction. However, I have had a
> few cases where automatic resolution did not occur. Instead, I had to go i
n
> and manually kill the transaction that is causing a deadlock.
> Is there anyway to avoid this? I don't want to have to manually kill a
> transaction to unwind a deadlock if that's at all possible.
> Thanks in advance
>
>

No comments:

Post a Comment