简体   繁体   中英

Error using distributed transaction in SQL Server 2008 R2

I am using SQL Server 2008 R2.

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.

ERROR:: The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "server name" was unable to begin a distributed transaction. when executed in transaction

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'

Or you can do it with T-SQL :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM