Is there a good way to report on Microsoft SQL server deadlock information in C#? I have a C# program that is running queries, updates, etc... Occasionally it gets a deadlock error but the error message is not particularly helpful in diagnosing the problem:
Transaction (Process ID 347) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Right now I have to track down a DBA to go search through SQL logs to get the deadlock graph. I was wondering if there is a way to get at this information programatically?