Reputation: 12615
The SQLException "was deadlocked on lock resources with another process and has been chosen as the deadlock victim" is quite common ;-)
Does the exception contains the query text executed somewhere ? Is it possible to obtain ?
Thks
Upvotes: 0
Views: 231
Reputation: 62157
Yes, but not in your exception. You SHOULD KNOW WHAT YOU DID - and the exception just tells you that YOU Deadlocked. You should know what SQL youwere executing at this moment.
For the rest, use the query profiler and other information you obtain from teh server (check http://support.microsoft.com/kb/832524 for some tips, or http://msdn.microsoft.com/en-us/library/aa937573(v=SQL.80).aspx to find out what OTHER scripts you deadlock with. THis is, though, for very obbvious security reasons, something onl adins do.
Upvotes: 1