• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

How to capture deadlock information

0
Master_Blaster
Asked:
Master_Blaster
1 Solution
 
sachiekCommented:
Which version of SQL svr are u using? 6.5x or 7.x or 2k?


Sachi
0
 
Master_BlasterAuthor Commented:
SQL Server v.7.0
0
 
ZhongYuCommented:
Deadlock information is written in SQL error log. It does not happen often.

 
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Deadlocks should be avoided as much as possible...
If you run already into deadlocks, you must review your code!

As ZhongYu indicates, deadlocks are written in the SQL error log. Now to debug deadlocks, you need to check the locks on the objects, and locate the code that issues these locks.

Cheers
0
 
Jeremy_DCommented:
Fire up SQL Profiler. Start a new trace. From the 'Events' tab, select 'Lock: Deadlock' and 'Lock: Deadlock chain' (under the heading 'Locks') and add them to the selected events. Let it run for a while...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Are the Trace Deadlocks not avaible since SQL 2000?
not sure...
0
 
Jeremy_DCommented:
They are available in 7.0 SP2 installation. Not sure about previous 7.0 SPs, but I seem to recall that they didn't add new events until SP3...
0
 
nigelrivettCommented:
Set on the trace flags.
I think it's 1204, 1205 - you shold be able to find it in bol, this will give info about the instructions involved in the deadlocks.
0
 
CleanupPingCommented:
Master_Blaster:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
SQLMasterCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept Jeremy_D's comment as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Dheeraj Jain
EE Cleanup Volunteer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now