?
Solved

How to capture deadlock information

Posted on 2001-06-14
10
Medium Priority
?
361 Views
Last Modified: 2012-05-05
0
Comment
Question by:Master_Blaster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 143

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
 
LVL 143

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 1200 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

762 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