Forums (RSS 2.0)" href="http://www.simple-talk.com/community/forums/rss.aspx?ForumID=-1&Mode=0" />
Click here to monitor SSC

How to Track Down Deadlocks Using SQL Server 2005 Profiler

Last post 03-02-2012, 3:05 PM by Prakash7900. 30 replies.
Page 2 of 3 (31 items)   < Previous 1 2 3 Next >
Sort Posts: Previous Next
  •  07-21-2008, 3:12 PM Post number 63130 in reply to post number 71471

    • tom is not online. Last active: 01-09-2007, 8:36 AM tom
    • Not Ranked
    • Joined on 12-18-2006
    • Level 1: Deep thought

    Performance Hit

    Profiler is an incredible performance hog, running it will certainly cause your phone to ring off the wall within moments of activating it. Picture instantly doubling the load on your production server.
  •  07-28-2008, 4:38 AM Post number 64735 in reply to post number 71471

    profiler 2005 on sql 2000 instance

    is it possible to connect your sql2005 profiler to a sql2000 instance and get the same kind of troubleshooting info?
  •  08-06-2008, 9:14 AM Post number 66518 in reply to post number 71471

    More sql data

    Is it possible to obtain the full sql that was passed in order to cause the deadlock, eg the parameters as well as the other statements within the same transaction?

    Other than running a full trace and trying to match it up afterwards. I will have gigs of data to sift through if this was the case.
  •  08-12-2008, 10:00 PM Post number 68083 in reply to post number 71471

    Really helpful.

    Thanks
  •  08-19-2008, 1:34 PM Post number 69080 in reply to post number 71471

    Profiler Hit Response

    If Profiler is used properly, the performance hit is minimal. They key is to only collect those events and data columns that are absolutely necessary. I have used in on production databases with no problems and no visible impact on users. In SQL Server 2008, you have the option to use Extended Events to capture data very similar to what Profiler captures, and it uses even less resources.
    Brad M McGehee
    Director of DBA Education
    Red Gate Software
  •  08-19-2008, 1:38 PM Post number 69081 in reply to post number 71471

    Profiler 2005 on SQL 2000 Instance Response

    SQL Server 2005 Profiler can collect SQL Server 2000 data with no problem. But, SQL Server 2005 Profiler can't collect events from SQL Server 2000 that don't exist in 2000. Unfortunately, the Deadlock Graph event in 2005 does not exist in 2000.
    Brad M McGehee
    Director of DBA Education
    Red Gate Software
  •  08-19-2008, 1:48 PM Post number 69082 in reply to post number 71471

    More SQL Data Response

    The Deadlock event unfortuntely doesn't capture every last bit of data that you might want to troubleshoot the problem. That's why I always try to capture the code before the event so I can get a better picture of what is happening, assuming this data is necessary to resolve the problem. Yes, this might end up producing a lot of data on busy servers. But the data you need will be just before the deadlock event, so it should not be hard to find. Of course, if the server is so busy that collecting the data produces a performance problem because you have to run the trace for long time periods in order to "catch" the deadlock, you may not be able to collect the surrounding data, instead just capturing the deadlock event and using it to resolve the problem. This may make the troubleshooting process more difficult, but not impossible.
    Brad M McGehee
    Director of DBA Education
    Red Gate Software
  •  04-15-2010, 4:39 PM Post number 90666 in reply to post number 71471

    • FerPB is not online. Last active: 04-15-2010, 4:40 PM FerPB
    • Not Ranked
    • Joined on 04-15-2010
    • Level 1: Deep thought

    Amazing article

    Thanks, exelent article! Brad, I got an "PAG: 9:1:3778" in logs for both nodes involved in the deadlock (2YK MsSql Server).. so, how can deal with this information?
  •  08-27-2010, 2:10 AM Post number 94214 in reply to post number 71471

    Little typo mistake here

    There is little typo mistake on 1st paragraph

    process one also wants an exclusive lock on object two, and object two wants an exclusive lock on object one.

    It should be as below (it should be process instead of Object):

    process one also wants an exclusive lock on object two, and object (Process) two wants an exclusive lock on object one.
  •  03-10-2011, 2:31 AM Post number 100746 in reply to post number 71471

    One question

    Great article. Thanks.
    I've a question when I see the deadlock graph of my database on hovering the mouse on right side oval shape box I see "FETCH API_CURSOR0000000009727CAE"
    What does it mean?
    Please help me understanding this one.
  •  03-29-2011, 1:11 AM Post number 100998 in reply to post number 71471

    Greate one

    Hi, this is really very good article. i come to know about lot of new things. now i m going use it on my production server. Thx

  •  10-11-2011, 12:37 AM Post number 103774 in reply to post number 71471

    Really worth reading.

    Thanks, good article.
    Robert Dennyson
    Software Programmer,
    BandyWorks Solutions.
  •  02-08-2012, 1:06 PM Post number 105935 in reply to post number 71471

    • delta is not online. Last active: 02-09-2012, 2:02 PM delta
    • Not Ranked
    • Joined on 02-08-2012
    • Level 1: Deep thought

    deadlock problem occurred while accessing same proc(same index)

    Hi Brad, Thanks for posting this great article. I followed the steps provided by you to create deadlock graph. I was successfully able to create graph for deadlock occuring in my app. Only problem with deadlock graph in my application case is it has same index is cause of problem.
    In above example two indexes held by two processes each one waiting for another. But in my application its same index (same proc) causing deadlock issue. Its key level lock. There aremultiple select, update stmts in proc.
    Can you provide your valuable analysis on this problem? Highly appreciate it,
    Thanks
  •  02-08-2012, 1:11 PM Post number 105936 in reply to post number 71471

    • delta is not online. Last active: 02-09-2012, 2:02 PM delta
    • Not Ranked
    • Joined on 02-08-2012
    • Level 1: Deep thought

    deadlock problem occurred while accessing same proc(same index)

    Hi Brad, Thanks for posting this great article. I followed the steps provided by you to create deadlock graph. I was successfully able to create graph for deadlock occuring in my app. Only problem with deadlock graph in my application case is it has same index is cause of problem.
    In above example two indexes held by two processes each one waiting for another. But in my application its same index (same proc) causing deadlock issue. Its key level lock. There aremultiple select, update stmts in proc.
    Can you provide your valuable analysis on this problem? Highly appreciate it,
    Thanks
  •  02-08-2012, 1:12 PM Post number 105938 in reply to post number 71471

    • delta is not online. Last active: 02-09-2012, 2:02 PM delta
    • Not Ranked
    • Joined on 02-08-2012
    • Level 1: Deep thought

    deadlock problem occurred while accessing same proc(same index)

    Hi Brad, Thanks for posting this great article. I followed the steps provided by you to create deadlock graph. I was successfully able to create graph for deadlock occuring in my app. Only problem with deadlock graph in my application case is it has same index is cause of problem.
    In above example two indexes held by two processes each one waiting for another. But in my application its same index (same proc) causing deadlock issue. Its key level lock. There aremultiple select, update stmts in proc.
    Can you provide your valuable analysis on this problem? Highly appreciate it,
    Thanks
Page 2 of 3 (31 items)   < Previous 1 2 3 Next >
View as RSS news feed in XML