FIX: Deadlock Information Reported with SQL Server 2000 Profiler Is Incorrect (282749)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q282749
BUG #: 236542, 352733, 352734, 352735 (SHILOH_BUGS)

SYMPTOMS

The information captured in the Lock:Deadlock and Lock:Deadlock Chain event classes may not be correct.

Whenever a deadlock is encountered, the following information captured in the SQL Server 2000 Profiler utility may be incorrect:
  • The SPID column for the Lock:Deadlock Chain event reports an invalid system process ID (SPID).
  • The Integer Data column for the two events is not the same. This represents the deadlock number and should be the same for a deadlock.
  • The number of Lock:Deadlock Chain events is incorrect. For example, with two processes in a deadlock, there should be three Deadlock Chain events; instead, only two Deadlock Chain events are reported.
  • The EventSubClass column may return misleading information about lock mode. Use the Mode column instead of the EventSubClass column to determine lock mode.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

    293632 FIX: EventSubClass Column Incorrect for Deadlock Chain Events

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

WORKAROUND

Trace flag 1204 can be used to capture deadlock information to the SQL Server errorlog.

SQL Profiler can still provide valuable information that can help resolve a deadlocking problem by capturing and analyzing events leading up to the deadlock. At the minimum, include the RPC:Starting and SQL:BatchStarting events.

In addition, SQL Profiler is very helpful in tracking down events in a stored procedure that could be contributing to a deadlock. You would want to include the Stored Procedure event classes (SP:Completed, SP:Starting, SP:StmtCompleted, and SP:StmtStarting) and T-SQL event classes (SQL:BatchStarting and SQL:BatchCompleted).

For additional details, refer to the "Troubleshooting Deadlocks" section in SQL Server Books Online.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.

Modification Type:MajorLast Reviewed:10/16/2003
Keywords:kbbug kbfix KB282749