Distributed transaction error?

后端 未结 2 803
青春惊慌失措
青春惊慌失措 2020-12-03 13:06

In stored procedure I am using below statements. But it throwing Distributed transaction error when I ran Stored Proc.

Declare @res int
    Declare @mes as v         


        
2条回答
  •  温柔的废话
    2020-12-03 13:30

    This is what worked for me:

    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 '<>', 'remote proc transaction promotion', 'false';
    

提交回复
热议问题