sys.sp_lock

general
#stored-procedure

Description

Reports information about locks. A Database Engine session ID number from information about the session. If isn’t specified, information about all locks is displayed. Another Database Engine session ID number from and about which the user also wants information. This feature will be removed in a future version of SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. To

Syntax

sp_lock
[ [ @spid1 = ] spid1 ]
[ , [ @spid2 = ] spid2 ]
[ ; ]