Solved

How to capture deadlock information

Posted on 2001-06-14
10
355 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server 2012 - Merge Replication Issue 1 23
always on switch back after failover 2 35
sql server tables from access 18 22
Update a text value in another table 10 42
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.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
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…

832 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