CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of locks
SQL
declare @tablevar table(spid int, dbid int, objid int, indid int, [type] varchar(64), resource varchar(64), mode varchar(64), status varchar(64))
insert into @tablevar exec sp_lock
select spid, dbid, ObjId, object_name( objid), IndId, [type], Resource, Mode, Status from @tablevar 
by Steve Scheffler   September 27, 2011 @ 11:58am
Tags: sql, locks
86 Views
no comments
 
SQL
--
-- Dump object names for any locks currently waiting
--
declare @tablevar table(spid int, dbid int, objid int, indid int, [type] varchar(64), resource varchar(64), mode varchar(64), status varchar(64))
insert into @tablevar exec sp_lock
select object_name( objid) from @tablevar where status = 'WAIT'
by Steve Scheffler   September 27, 2011 @ 9:06am
Tags: sql, locks
75 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate