By using this web site, you agree to all terms and conditions for acceptable use.

ServiceLedger KnowledgeBase Knowledgebase Home Page > ServiceLedger | Contact Us

Search the Knowledge Base Browse by Category

ServiceLedger provides this content as-is for self help support purposes. ServiceLedger assumes no liability for any steps you take based on the directions in our knowledge base, and assumes that you have the knowledge to determine whether a given step is appropriate for your situation. Certain solutions can affect third-party software that ServiceLedger relies on or integrates with; it is your responsibility to consult with the documentation or publishers of such third-party software to understand whether any changes suggested here will have negative effects on other applications.

(Internal) How to Enable Deadlock Tracing

Would you like to...

Print this page
Email this to a friend

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);

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.

Related Questions:


No attachments were found.

ServiceLedger KnowledgeBase Copyright © 2020
Powered by AcitveKB Knowledgebase Software