首页 > 代码库 > The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

同事反馈一个系统在运行一个存储过程时遇到了下面错误:

 

Msg 1206, Level 18, State 169, Procedure xxxxxx, Line 118
The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.


费了九牛二虎之力才定位到是我们一个作业把对应的会话给Kill掉了(此作业按条件Kill掉那些阻塞其它会话的会话)。今天在测试服务器特意重现、测试、验证了这个问题。特此记录一下!因为这种分布式事务的问题确实不好定位,记录此案例,只是为遇到这种问题时提供一个思路!

The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.