1、查询锁表语句
select request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from sys.dm_tran_locks
where resource_type = 'OBJECT'
2、查看被锁语句
dbcc inputbuffer(spid);
3、强制解锁
kill spid
原文链接:(62条消息) SQLserver查询锁表和解锁_挨踢诗人的博客-CSDN博客_sqlserver 查询锁
标签:锁表,解锁,OBJECT,SQLserver,查询,spid From: https://www.cnblogs.com/gaobing/p/16994646.html