本文介绍了在 SQL Server 2008 R2 中使用分布式事务时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 SQL Server 2008 R2.

I am using SQL Server 2008 R2.

当我尝试从 Java 端执行 SP 时出现以下错误.当我使用查询浏览器运行时,相同的SP运行良好.

I am getting the following error when I try to execute a SP from java side. The same SP is running well when I use query browser to run.

我也尝试过使用修补程序,但它不起作用.

I have tried using hot fix also but it is not working.

错误 :: 由于链接服务器服务器名称"的 OLE DB 提供程序SQLNCLI10"无法开始分布式事务,因此无法执行该操作.在事务中执行时

推荐答案

在 SQL Server Management Studio 中,展开服务器对象,然后是链接服务器,然后右键单击有问题的链接服务器并选择属性".选择服务器选项"页面,并确保启用分布式事务的提升"设置为假"

Inside 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';

这篇关于在 SQL Server 2008 R2 中使用分布式事务时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:56
查看更多