Contains information on all granted, converting, and waiting lock requests. This table is a denormalized tabular view of internal data structures of the lock manager and is stored only in the master database.
Column name | Data type | Description |
---|---|---|
rsc_text | nchar(32) | Textual description of a lock resource. Contains the portion of the resource name that is distinct from the rsc_dbid, rsc_objid, rsc_indid triple, if one exists. |
rsc_bin | binary(16) | Binary lock resource. Contains the actual lock resource that is contained in the lock manager. This column is included for tools that are aware of the lock resource format for generating their own formatted lock resource, and for performing self joins on syslockinfo. |
rsc_valblk | binary(16) | Lock value block. Some resource types may include additional data in the lock resource that is not hashed by the lock manager to determine ownership of a particular lock resource. For example, page locks are not owned by a particular object ID. For lock escalation and other purposes, however, the object ID of a page lock may be placed in the lock value block. |
rsc_dbid | smallint | Database ID associated with the resource. |
rsc_indid | smallint | Index ID associated with the resource, if appropriate. |
rsc_objid | int | Object ID associated with the resource, if appropriate. |
rsc_type | tinyint | Resource type. Can be:
1 = NULL Resource (not used) |
rsc_flag | tinyint | Internal resource flags. |
req_mode | tinyint | Lock request mode. This column is the lock mode of the requester and represents either the granted mode, or the convert or waiting mode. Can be:
0 = NULL. No access is granted to the resource. Serves as a placeholder. 1 = Sch-S (Schema stability). Ensures that a schema element, such as a table or index, is not dropped while any session holds a schema stability lock on the schema element. 2 = Sch-M (Schema modification). Must be held by any session that wants to change the schema of the specified resource. Ensures that no other sessions are referencing the indicated object. 3 = IS (Intent Shared). Indicates the intention to place S locks on some subordinate resource in the lock hierarchy. 4 = SIU (Shared Intent Update). Indicates shared access to a resource with the intent of acquiring update locks on subordinate resources in the lock hierarchy. 5 = IS-S (Intent Shared-Shared). Is a composite key-range lock mode that is used to ensure serializability in index row-level locking. 6 = IX (Intent Exclusive). Indicates that the locking session will acquire X locks on subordinate resources in the lock hierarchy. 7 = SIX (Shared Intent Exclusive). Indicates shared access to a resource with the intent of acquiring exclusive locks on subordinate resources in the lock hierarchy. 8 = S (Shared). The holding session is granted shared access to the resource. 9 = U (Update). Indicates an update lock acquired on resources that may eventually be updated. It is used to prevent a common form of deadlock that occurs when multiple sessions are locking resources and are potentially updating them at a later time. 10 = IIn-Nul. (Intent Insert-NULL). Is a composite key-range lock mode that is used in index row-level locking. 11 = IS-X (Intent Shared-Exclusive) Used by serializable transactions inserting into a range that has been previously scanned. 12 = IU (Intent Update). Indicates that the locking session will acquire update locks on subordinate resources in the lock hierarchy. 13 = IS-U. (Intent Shared-Update). Used for serializable update scans. 14 = X. (Exclusive). The holding session is granted exclusive access to the resource. 15 = BU. Used by bulk operations. |
req_status | tinyint | Status of the lock request. Can be: 1 = Granted 2 = Converting 3 = Waiting |
req_refcnt | smallint | Lock reference count. Each time a transaction asks for a lock on a particular resource, a reference count is incremented. The lock cannot be released until the reference count equals 0. |
req_cryrefcnt | smallint | Carry-over reference count. Most locks are released at the end of a transaction. Certain locks, such as cursor marker locks, are not released at the end of a transaction and are held, or carried over, to the next transaction. |
req_lifetime | int | Lock lifetime bitmap. During certain query processing strategies, locks must be maintained on resources until the query processor has completed a particular phase of the query. The lock lifetime bitmap is used by the query processor and transaction manager to denote groups of locks that can be released when a certain phase of a query is completed. Certain bits in the bitmap are used to denote locks that are held until the end of a transaction, even if their reference count equals 0. |
req_spid | int | Internal Microsoft® SQL Server™ process ID of the session requesting the lock. |
req_ecid | int | Execution context ID (ECID). Used to denote which thread in a parallel operation owns a particular lock. |
req_ownertype | smallint | Type of object associated with the lock. Can be one of the following: 1 = Transaction 2 = Session 3 = Cursor |