由于OLE DB提供程序"SQLNCLI10"被禁用,因此无法执行该操作.用于链接服务器“(null)"无法开始分布式交易 [英] The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "(null)" was unable to begin a distributed transaction

查看:406
本文介绍了由于OLE DB提供程序"SQLNCLI10"被禁用,因此无法执行该操作.用于链接服务器“(null)"无法开始分布式交易的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用连接池与SQL Server 2008连接.

I am using Connection Pooling to connect with SQL Server 2008.

使用通过XA连接的JNDI名称来获得跨DB服务器的访问.现在,除了使用OPENROWSET的查询之外,我的所有查询都可以正确执行.

With JNDI Name using XA connection to get access across DB server. Now my all query execute properly except query which use OPENROWSET.

现在,此OPENROWSET在正常连接下可以正常运行,但是在执行XA连接时会出现异常:

Now this OPENROWSET runes fine with normal connection but while executing with XA connection it gives an exception :

由于链接服务器(null)"的OLE DB提供程序"SQLNCLI10"无法开始分布式事务,因此无法执行该操作.

The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "(null)" was unable to begin a distributed transaction.

有人可以帮我解决这个问题吗? 如果您不理解,请重播,我会解释更多.

Can any one help me for this issue? If you don't understand please replay, I'll explain more.

推荐答案

尝试一下:

在SQL Server Management Studio中连接到数据库,依次展开服务器对象",链接的服务器",然后右键单击有问题的链接服务器并选择属性".选择服务器选项"页面,并确保启用对分布式交易的促进"设置为假"

Connect to your database in SQL Server Management Studio, expand Server Objects, then Linked Server, then right click on the linked server in question and choose 'Properties.' Select the 'Server Options' page, and make sure 'Enable Promotion of Distributed Transactions' is set to 'False'

或者您可以使用 T-SQL :

Or you can do it with T-SQL:

USE master;
EXEC sp_serveroption '<<your linked server name>>', 'remote proc transaction promotion', 'false';

这篇关于由于OLE DB提供程序"SQLNCLI10"被禁用,因此无法执行该操作.用于链接服务器“(null)"无法开始分布式交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆