1. 程式人生 > >SQLServer查詢死鎖

SQLServer查詢死鎖

--查詢死鎖
select    
    request_session_id spid,   
    OBJECT_NAME(resource_associated_entity_id) tableName    
from    
    sys.dm_tran_locks   
where    
    resource_type='OBJECT' 

--殺死死鎖程序
kill 354