首页 > 解决方案 > 如何在 MSSQL 中找到导致死锁的进程

问题描述

我正在从车载计算机到第三方应用程序的延迟到达和离开,该应用程序使用从 OBC 收集的信息生成 XML 文件。

我试图将数据库中某些事务的状态更新到所有第 3 方应用程序以处理信息,但它没有帮助。

以下是 Arrival 和 Depart OBC 接口 ( ) 的 MIF 调度程序代码中逻辑的高级时间顺序MPNL.Services:mapPacosEvent

错误:

2019-07-17 14:02:00 EDT [ART.0114.1007E] Adapter Runtime: Error Logged. See Error log for details. Error: [ADA.1.316] Cannot execute the SQL statement "UPDATE  allinboundmessages SET status = ?  WHERE uniqkey = ? AND vehicle_number = ? AND message_type = ? AND form_id = ?". "
(40001/1205) Transaction (Process ID 78) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
Transaction (Process ID 78) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
2019-07-17 14:02:00 EDT [ART.0114.1007E] Adapter Runtime: Error Logged. See Error log for details. Error: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service MPNL.AdapterServices:updateAllInboundMessageRecs.
[ADA.1.316] Cannot execute the SQL statement "UPDATE  allinboundmessages SET status = ?  WHERE uniqkey = ? AND vehicle_number = ? AND message_type = ? AND form_id = ?". "
(40001/1205) Transaction (Process ID 78) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
Transaction (Process ID 78) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

标签: linux

解决方案


如果您运行存储的 proc sp_who2,它将显示哪些进程被阻塞以及哪些进程正在执行阻塞。


推荐阅读