Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在SQL Server 2008 R2中使用分布式事务时出错_Sql_Sql Server_Sql Server 2008 R2_Distributed Transactions - Fatal编程技术网

在SQL Server 2008 R2中使用分布式事务时出错

在SQL Server 2008 R2中使用分布式事务时出错,sql,sql-server,sql-server-2008-r2,distributed-transactions,Sql,Sql Server,Sql Server 2008 R2,Distributed Transactions,我正在使用SQLServer2008R2 当我尝试从java端执行SP时,出现以下错误。当我使用查询浏览器运行时,同一个SP运行良好 我也尝试过使用热修复程序,但它不起作用 错误::无法执行该操作,因为链接服务器“服务器名称”的OLE DB提供程序“SQLNCLI10”无法开始分布式事务。 在事务中执行时 在SQL Server Management Studio中,展开服务器对象,然后展开链接服务器,然后右键单击相关链接服务器并选择“属性”。选择“服务器选项”页面,并确保“启用分布式事务升级”

我正在使用SQLServer2008R2

当我尝试从java端执行SP时,出现以下错误。当我使用查询浏览器运行时,同一个SP运行良好

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

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


在SQL Server Management Studio中,展开服务器对象,然后展开链接服务器,然后右键单击相关链接服务器并选择“属性”。选择“服务器选项”页面,并确保“启用分布式事务升级”设置为“False”

或者,您也可以使用:

使用master;
EXEC sp_服务器选项“”,“远程进程事务升级”,“false”;

是否有链接的服务器?你确定这些查询是相同的吗?是的。此外,查询也是相同的。
USE master;
EXEC sp_serveroption '<<your linked server name>>', 'remote proc transaction promotion', 'false';