摘要:
1 select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName 2 3 from sys.dm_tran_locks where resource_type='OBJECT' 4 5 declare @spid int 6 7 Set @spid =260 --锁表进程 8 9 declare @sql varchar(1000)10 11 set @sql='kill '+cast(@spid as varchar)12 13 exec(@sql... 阅读全文