-1

SQL server deadlocks usually happen due to lock resources. Other causes are memory, etc.

When the deadlock error message clearly states that the deadlock is due to lock resources, then does it always mean that Process 1 wants lock on resource A and has lock on resource B. And Process 2 wants lock on resources B and has lock on resource A? Or could this error also be due to latch waits?

1 Answer 1

1

Or could this error also be due to latch waits?

The deadlock will be because of the classic reverse locking pattern, as you mentioned. The only exception I can think of is if the deadlock is an intra-query parallel deadlock, as discussed here:

Solving intra parallel query deadlocks

However, latch waits could absolutely exacerbate a deadlock problem because they will cause locks to be held for longer than they would have otherwise.

Not the answer you're looking for? Browse other questions tagged or ask your own question.