gpt4 book ai didi

sql - 链接服务器的 OLe DB 提供程序 "SQLNCLI"无法开始分布式事务

转载 作者:行者123 更新时间:2023-12-02 15:34:47 24 4
gpt4 key购买 nike

我正在尝试调用 SQL Server 2008 中的存储过程并将获取的数据存储到本地临时表中。

当我尝试运行它时,收到以下错误:

The operation could not be completed because OLe DB provider "SQLNCLI" for linked server was unable to begin a distributed transaction

我的代码如下:

create table #temp(
col1 as int,
col2 as varchar(50)
)

insert into #temp
exec [192.168.0.9].[db1].[dbo].[tablename] @usr_id=3

最佳答案

您可以通过将服务器选项“remote proc transaction Promotion”设置为“false”来阻止对链接服务器使用分布式事务:

EXEC sp_serveroption 'servername', 'remote proc transaction promotion', 'false'

Here's the same issue

关于sql - 链接服务器的 OLe DB 提供程序 "SQLNCLI"无法开始分布式事务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18657768/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com