T-SQL Tutorial

T-SQL Sp_lock


On Transact SQL language the sp_lock is part of Database Engine Stored Procedures and shows information about locks.

Sp_lock syntax:

sp_lock [ [ @spid = ] 'session ID' ] ;





Sp_lock example 1:

USE model;
GO
EXEC sp_lock;
GO

Sp_lock example 2:

USE model;
GO
EXEC sp_lock 53,54;
GO