[AccessD] Trace Deadlocks Using DBCC TRACEON (1204)

RANDALL R ANTHONY RRANTHON at sentara.com
Wed Oct 15 09:19:45 CDT 2008


Paul,
Use the DBCC TRACEON (3605,1204,-1) command.  In Mgt Studio create a new query and run on master.  You can easily view the output in the results window if you right click and have results go to text, us the exec master..sp_readerrorlog in the query window and you can view the deadlocks.  An example of what you'd see is:
 
2008-10-03 11:32:07.900 spid4s       Deadlock encountered .... Printing deadlock information
2008-10-03 11:32:07.900 spid4s       Wait-for graph
2008-10-03 11:32:07.900 spid4s       NULL
2008-10-03 11:32:07.900 spid4s       Node:1
2008-10-03 11:32:07.900 spid4s       KEY: 8:2342711617781760 (ffffffffffff) CleanCnt:4 Mode:RangeS-S Flags: 0x0
2008-10-03 11:32:07.900 spid4s        Grant List 0:
2008-10-03 11:32:07.900 spid4s        Grant List 1:
 
HTH...

>>> On 10/15/2008 at 3:50 AM, in message <38c884770810150050j706ebd5x791a544763cc3294 at mail.gmail.com>, "Paul Hartland" <paul.hartland at googlemail.com> wrote:
To all,

We have started getting a couple of deadlocking issues every now and again,
I have read that you can turn on a trace using

DBCC TRACEON (1204)
Can anyone tell me, where this command will put the results in a case of a
deadlock being raised.  Or has anyone any better ideas, of how I can find
out the queries/views/SP's that are causing the deadlocks please.

I have told each of our staff to report to me immediately if they get a
deadlock issue, so then I want to look at a report or log to attempt to find
out what is going on.

Thanks in advance for any help on this.


-- 
Paul Hartland
paul.hartland at googlemail.com 
-- 
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com ( http://www.databaseadvisors.com/ )



More information about the AccessD mailing list