Microsoft KB Archive/103855

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:46, 20 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: Information on DBCC 1204 (Deadlock) Output

Q103855



The information in this article applies to:


  • Microsoft SQL Server version 4.2x





SUMMARY

If a deadlock problem is encountered, it is often useful to use the DBCC 1204 trace flag to gather additional information. 1204 prints out the deadlock chains and victim.



MORE INFORMATION

An example of a 1204 output is below:

      • Deadlock detected - process 5 trying to wait on process 1

Deadlock chain -->
LOCK REQUEST INITIATING DEADLOCK: LOGICAL:
SH_PAGE at 0x1887551e


lockid=6074 spid=5 dbid=6

Process 1 waiting on Process 5 for resource: LOGICAL.
Lock requested by spid 1:
SH_PAGE at 0x1867151e


lockid=4301 spid=1 dbid=6

BLOCKED by spid 5 with the following lock:
EX_PAGE Blocking at 0x256752c0


lockid=4301 spid=5 dbid=6
pstat=0x0100[ ]



VICTIM: process 1;pstat 0x0100 [ ]; cputime=26 VICTIM: process 5;pstat 0x0100 [ ]; cputime=8

Process 5 was selected as victim

Your server command (process id #5) was deadlocked with
another process and has been chosen as deadlock victim.
Re-run your command.
(Msg 1205, Level 13, State 1).


Caller is deadlock victim (5: 0x0100)


We can extract the following information from this output:


  1. The spid and dbid numbers accurately reflect the spid and dbid involved.
  2. For a page lock, the lockid value is the logical page number in the database on which the deadlock occurred. This page number can be used to find the object on which the deadlock occurred. For a table lock, the lockid is the object id.
  3. The hex values for the lock pointers (SH_PAGE at 0x1887551e) are lock pointers. They are not of immediate value in debugging a deadlock problem.
  4. The deadlock victim is accurately reflected.
  5. The process with the least CPU time is selected as deadlock victim.

Additional query words:

Keywords : kbother
Issue type : kbinfo
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ420OS2


Last Reviewed: February 6, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.