首页 > 数据库技术 > 详细

SQL Server deadlock

时间:2016-08-26 22:49:34      阅读:285      评论:0      收藏:0      [点我收藏+]

use the below sql to find the deadlock:

select    
    request_session_id spid,   
    OBJECT_NAME(resource_associated_entity_id) tableName    
from    
    sys.dm_tran_locks   
where    
    resource_type=‘OBJECT‘

 

then kill spid.

 

Sometimes, the deadlock is caused by the connections created by SQL studio management. you need to close all these connections.

SQL Server deadlock

原文:http://www.cnblogs.com/damonluffy/p/5811822.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!