Blocked Process Report Event Class

The Blocked Process Report event class indicates that a task has been blocked for more than a specified amount of time. This event class does not include system tasks or tasks that are waiting on non deadlock-detectable resources.

To configure the threshold and frequency at which reports are generated, use the sp_configure command to configure the blocked process threshold option, which can be set in seconds. By default, no blocked process reports are produced. For more information about setting the blocked process threshold option, see blocked process threshold Option.

For information about filtering the data returned by the Blocked Process Report event class, see How to: Filter Events in a Trace (SQL Server Profiler), How to: Set a Trace Filter (Transact-SQL), or sp_trace_setfilter (Transact-SQL).

Blocked Process Report Event Class Data Columns

Data column name Data type Description Column ID Filterable

DatabaseID

int

ID of the database in which the lock was acquired. SQL Server Profiler displays the name of the database if the ServerName data column is captured in the trace and the server is available. Determine the value for a database by using the DB_ID function.

3

Yes

Duration

bigint

The amount of time (in milliseconds) that the process was blocked.

13

Yes

EndTime

datetime

Time at which the event ended. This column is not populated for starting event classes, such as SQL:BatchStarting or SP:Starting.

15

Yes

EventClass

int

Type of event = 137.

27

No

EventSequence

int

The sequence of a given event within the request.

51

No

IndexID

int

ID for the index on the object affected by the event. To determine the index ID for an object, use the indid column of the sysindexes system table.

24

Yes

IsSystem

int

Indicates whether the event occurred on a system process or a user process. 1 = system, 0 = user.

60

Yes

LoginSid

image

Security identifier (SID) of the logged-in user. This event is always reported from the system thread. IsSystem = 1; SID = sa.

41

Yes

Mode

int

The state the event has received or is requesting.

0=NULL

1=Sch-S

2=Sch-M

3=S

4=U

5=X

6=IS

7=IU

8=IX

9=SIU

10=SIX

11=UIX

12=BU

13=RangeS-S

14=RangeS-U

15=RangeI-N

16=RangeI-S

17=RangeI-U

18=RangeI-X

19=RangeX-S

20=RangeX-U

21=RangeX-X

32

Yes

ObjectID

int

System-assigned ID of the object on which the lock was acquired, if available and applicable.

22

Yes

ServerName

nvarchar

Name of the instance of SQL Server being traced.

26

SessionLoginName

nvarchar

The login name of the user that originated the session. For example, if you connect to SQL Server using Login1 and execute a statement as Login2, SessionLoginName shows Login1; and LoginName shows Login2. This column displays both SQL Server and Windows logins.

64

Yes

TextData

ntext

Text value dependent on the event class captured in the trace.

1

Yes

TransactionID

bigint

System-assigned ID of the transaction.

4

Yes

See Also

Concepts

Detecting and Ending Deadlocks

Other Resources

Monitoring Events
sp_trace_setevent (Transact-SQL)
sp_configure (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance

Change History

Release History

5 December 2005

New content:
  • Added information about the units (seconds) in which the blocked process threshold is set.