如何解决死锁错误 [英] How to troubleshoot Deadlock errors

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

问题描述

事务(进程ID n)在锁资源上与另一个进程死锁,并被选为死锁牺牲品。重新运行交易。

如何解决错误?

Transaction (Process ID n) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
How to troubleshoot errors?

推荐答案

看看这些:

- < a href =http://support.microsoft.com/kb/832524> http://support.microsoft.com/kb/832524 [ ^ ]

- http://blog.sqlauthority.com/2007/05/16/sql-server-fix-error-1205-transaction-process-id-was-deadlocked-on-resources-with-另一个进程并且已经被选中作为死锁 - 受害者 - 重新运行 - 交易/ [ ^ ]



避免死锁的最佳方法是始终以相同的顺序对表进行修改。但是根据环境,这可能很难实现。
Have a look at these:
- http://support.microsoft.com/kb/832524[^]
- http://blog.sqlauthority.com/2007/05/16/sql-server-fix-error-1205-transaction-process-id-was-deadlocked-on-resources-with-another-process-and-has-been-chosen-as-the-deadlock-victim-rerun-the-transaction/[^]

The best way to avoid a deadlock is to make modifications to the tables always in the same order. However depending on the environment this may be hard to achieve.


尝试下面的答案



使用LINQ从SQL SERVER重新生成数据时获取死锁问题 [ ^ ]
try my answer below

Getting deadlock issue while reteriving a data from SQL SERVER using LINQ[^]


看看



使用LINQ从SQL SERVER重新生成数据时出现死锁问题 [ ^ ]


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

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