--查看数据锁SQL语句:
SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName FROM sys.dm_tran_locks WHERE resource_type='OBJECT'
--解锁SQL语句:
KILL spid
例如:KILL 51
--查看数据锁SQL语句:
SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName FROM sys.dm_tran_locks WHERE resource_type='OBJECT'
--解锁SQL语句:
KILL spid
例如:KILL 51
转载于:https://www.cnblogs.com/yipu/archive/2013/02/25/2932297.html