锁/死锁/块 [英] Locks / Deadlocks / Blocks

查看:114
本文介绍了锁/死锁/块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何识别锁定/死锁/阻止?


识别后的后续步骤是什么?


如何处理他们?


可以杀死什么类型的锁定/死锁/阻止?



谢谢提前,







sunnybabu

解决方案

当两个或多个进程访问同一个表时,您可以使用

$获取块b $ b

从sys.sysprocesses中选择* 

其中被阻止<> 0

SQL Server决定何时出现死锁情况并自行解决;没什么可以做的。


你可以杀死进程,但不能锁定。


参见例如  监控SQL数据库死锁



How to identify Locks / Deadlocks / Blocks ?

What is the next steps after identifying ?

How to deal with them ?

What type of Locks / Deadlocks / Blocks can be killed ?

Thanks in advance,


sunnybabu

解决方案

Blocks can happen when 2 or more processes accesses the same table, you get them with

select *
from sys.sysprocesses
where blocked <> 0

SQL Server decide when it's a deadlock Situation and resolve it on it's own; nothing what you can do.

You can kill process, but not locks.

See for example Monitoring SQL Database Deadlocks


这篇关于锁/死锁/块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆