我有一个在查询中正确执行的链接服务器,但是当我尝试在触发器中执行它时,我得到了这个:
Error Source: .Net SqlClient Data Provider
Error Message: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server [LINKEDSERVER] was unable to begin a distributed transaction.
... Returned Message "The Transaction Manager has disabled its support for remote/network transactions"
然后我在两台服务器上激活了 DTC:
下面是如何配置 MSDTC:
- 转到控制面板-> 管理工具
- 开放组件服务
- 展开组件服务 -> 计算机 -> 我的电脑 -> 分布式事务协调器
- 右键单击本地 DTC
- 点击属性
- 转到安全
现在我明白了:
Error Source: .Net SqlClient Data Provider.
Error Message: Timeout Expired. The timeout period elapsed prior to completition of th eoperation or the server is not responding.