查询出来
select
request_session_id spid,
OBJECT_NAME(resource_associated_entity_id) tableName
from
sys.dm_tran_locks
where
resource_type='OBJECT
杀死死锁进程
kill spid
eg: kill 54 54为spid
另:
exec master.dbo.sp_who_lock --查看当前死锁进程
exec master.dbo.p_killspid ytsafety--杀掉引起死锁的进程