由于链接服务器的 OLE DB 提供程序无法启动分布式事务,因此无法执行该操作

The operation could not be performed because OLE DB provider for linked server was unable to begin a distributed transaction

提问人:Orsi 提问时间:10/27/2023 更新时间:10/27/2023 访问量:21

问:

我在将某些数据插入链接服务器时遇到问题。 我收到问题标题上显示的错误消息。

  1. 我尝试设置本地 DTC 属性

enter image description here

  1. 我尝试将“启用分布式事务的提升”设置为“False”

enter image description here

它不能解决问题。

有趣的是,如果我在代码中创建与数据库的新连接并使用 Enlist=false,它就可以工作

enter image description here

如果我在代码中删除此连接,则会给出与分布式事务相关的相同错误。 问题是我想使用文件中的连接字符串来解决此问题,我认为如果我将此 Enlist 添加到它会起作用,但是尽管修改了使用此参数,但我收到错误Enlist=falseweb.configweb.config connectionstringconnection stringEnlist=false

 <add name="" connectionString="..........Enlist=false;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />


 The operation could not be performed because OLE DB provider for linked server was unable to begin a distributed transaction.
 OLE DB provider for linked server returned message "No transaction is active.".

任何帮助都是值得赞赏的!

连接字符串 分布式事务

评论


答: 暂无答案