Subject Troubleshooting Deadlock Exceptions
Author Robert DiFalco
Is there a way to troubleshoot deadlock exceptions? I have a large,
multi-threaded application with many objects/records spanning many
tables. Sometimes I get a deadlock exception in strange places, and the
information provided by the exception doesn't help me much.

For example, I have a table called ElementVersion that has no relations
and whose rows cannot be updated, only inserted and deleted. Sometimes
on the INSERT statement for this TABLE I will get a deadlock exception.
I have a background process that periodically SET STATISTICS on all
indices, and this may be the source of the error.

But what I'd like to really know is if there is a way of finding out
exactly *where* the contention was that caused the deadlock error.

Thoughts?

R.