一、SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName FROM sys.dm_tran_lockssession
WHERE resource_type='OBJECT 'code
spid :被鎖進程ID。進程
tableName:發生死鎖的表名。ci
二、只須要使用kill關鍵字來殺掉被鎖的進程ID就能夠對錶進行解鎖:it
KILL spidio