Deadlock tracing allows us to troubleshoot situations where customers get repeated error messages involving the word DEADLOCK after server performance problems have been ruled out. We can turn on trace flags on the server that let us get more information about the error, either permanently or until next restart--we do the "until next restart" version because it's better not to leave these flags on forever.
To enable tracing on a server, execute the following two separate SQL statements individually:
DBCC TRACEON(1222, -1);
DBCC TRACEON(1202, -1);
After deadlock tracing has been enabled, it will immediately begin logging deadlocks and will keep doing so until the server is restarted. The deadlocks are reported in the SQL Server Error Log (usually at "C:\Program Files (x86)\ServiceLedger\ServiceLedger\MSDE\MSSQL10_50.SERVICELEDGER\MSSQL\Log" and just named "ERRORLOG") and hopefully some .trc or .xml files will be generated in the same location.
Let the customer run for a day or two, at least long enough to have reported some deadlocks (and have them send us an e-mail every time they get one during this period!), then get on the server and grab copies of the relevant ERRORLOG file(s) and any .tr or .xml files generated. Once these files are gathered, you will need a developer to review the files to determine how to proceed.