sql | SQL Server‎ > ‎sqlsrv | T-SQL‎ > ‎

tsql | sp_lock filter

declare @t table (
spid bigint
, dbid bigint
, objid bigint
, indid int
, type nvarchar(10)
, resource nvarchar(max)
, mode nchar(10)
, status nvarchar(10)
)

insert into @t
exec sp_lock

select * from @t where status <> 'grant'
Comments