How to unlock tables which is lock in SQL SERVER or how to Kill SPID=-2

Posted by Kapildalke under Sql Server category on | Points: 40 | Views : 51585
If your tables are locked in SQL SERVER using some SSIS or SSRS or some other tools.
For unlock we need to kill process id from sql server .

if your table is locked then SPID=-2 stored in syslockinfo table .

you can't delete directly this process id (SPID=-2)
use this query and kill whatever you got from this query result.

select req_transactionUOW
from master..syslockinfo
where req_spid = -2

KILL '030C2647-E265-4860-817D-5240D9A720D8'

Comments or Responses

Login to post response