Deadlocks Involving Threads

Troubleshooting SQL Server

Troubleshooting

Deadlocks Involving Threads

In deadlocks that involve threads, Trace Flag 1204 provides information on the threads that have been granted statement permissions and threads that are waiting on permissions.

In the following example, several threads (SPID 64, 60, 59, 57, and 55) have UPDATE statement permissions, while SPID 51 is on the Wait list.

Node:1
 Granted thread list:
   SPID: 64 ECID: 0 Statement Type: UPDATE
   SPID: 60 ECID: 0 Statement Type: UPDATE
   SPID: 59 ECID: 0 Statement Type: UPDATE
   SPID: 57 ECID: 0 Statement Type: UPDATE
   SPID: 55 ECID: 0 Statement Type: UPDATE
 Wait thread list:
   SPID: 51 ECID: 0 Statement Type: UNKNOWN TOKEN

UNKNOWN TOKEN means the thread currently is not executing a batch.