Solved

How to capture deadlock information

Posted on 2001-06-14
10
353 Views
Last Modified: 2012-05-05
0
Comment
Question by:Master_Blaster
10 Comments
 
LVL 11

Expert Comment

by:sachiek
ID: 6193988
Which version of SQL svr are u using? 6.5x or 7.x or 2k?


Sachi
0
 

Author Comment

by:Master_Blaster
ID: 6193993
SQL Server v.7.0
0
 
LVL 2

Expert Comment

by:ZhongYu
ID: 6194047
Deadlock information is written in SQL error log. It does not happen often.

 
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6194515
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
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 6195124
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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6195362
Are the Trace Deadlocks not avaible since SQL 2000?
not sure...
0
 
LVL 4

Accepted Solution

by:
Jeremy_D earned 300 total points
ID: 6195464
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
 
LVL 18

Expert Comment

by:nigelrivett
ID: 6195534
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
 

Expert Comment

by:CleanupPing
ID: 9282214
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
 
LVL 3

Expert Comment

by:SQLMaster
ID: 9505814
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
set default date format in mssql to mm/dd/yyyy 22 65
Parse field in SQL View 15 96
SQL Server and getting client IP Address 6 49
recover sqlserver db 8 0
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now