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开发者_StackOverflow 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';
精彩评论