select request_session_id as spid, object_name(resource_associated_entity_id) as tablename
from sys.dm_tran_locks where resource_type = ‘object’
–spid 被锁的表的进程
–tablename 被锁的表名
–解锁
kill spid
select request_session_id as spid, object_name(resource_associated_entity_id) as tablename
from sys.dm_tran_locks where resource_type = ‘object’
–spid 被锁的表的进程
–tablename 被锁的表名
–解锁
kill spid