INF: Information on DBCC 1204 (Deadlock) Output
ID: Q103855
|
The information in this article applies to:
-
Microsoft SQL Server for OS/2, version 4.2
-
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:
- The spid and dbid numbers accurately reflect the spid
and dbid involved.
- 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.
- 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.
- The deadlock victim is accurately reflected.
- The process with the least CPU time is selected as
deadlock victim.
Keywords : kbother SSrvLock SSrvServer SSrvWinNT
Version : 4.2 | 4.2 4.21 4.2a 4.2b
Platform : OS/2 WINDOWS
Issue type :
Last Reviewed: March 17, 1999