最简单的方法就是采用SQL自带的性能监控工具,这里我们可以使用跟踪属性下面的事件选择项卡,展开锁节点,下面的有一个死锁图可供我们选择,它能帮忙我们分析死锁原因。
The simplest approach is to use SQL Profiler. There is "Deadlock graph" event in the "Locks" event group you can use. Click on the picture to open it in the different window.
在本例中,委托模型是一个正确的图(带有循环),所以死锁的发生可能是使用特定的类关系和线程的结果。
In this case, the delegation model is a proper graph (with cycles), and so a deadlock can occur as a result of particular class relationships and thread usage.
这个图必须是无环的,以避免造成调度上的死锁。
The graph must be acyclic to avoid program scheduling deadlocks.
应用推荐