1、SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName FROM sys.dm_tran_locks
WHERE resource_type='OBJECT '
spid :被鎖進程ID。
tableName:發生死鎖的表名。
2、只需要使用kill關鍵字來殺掉被鎖的進程ID就可以對表進行解鎖:
KILL spid
1、SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName FROM sys.dm_tran_locks
WHERE resource_type='OBJECT '
spid :被鎖進程ID。
tableName:發生死鎖的表名。
2、只需要使用kill關鍵字來殺掉被鎖的進程ID就可以對表進行解鎖:
KILL spid
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。