Distributed transaction error?

后端 未结 2 791
青春惊慌失措
青春惊慌失措 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:27

    Enable the options

    • Allow Remote Clients
    • Allow Outbound

    On Security tab of Local DTC Properties in Component Services.

    • Go To Run, type comexp.msc.
    • Double click "Console Root".
    • Double click "Component Services.
    • Double click "Computers".
    • Double click "My Computer".
    • Double click "Distributed Transaction Coordinator".
    • Right click "Local DTC" under "Distributed Transaction Coordinator", and click properties.
    • Click the "Security" tab.
    • Put tick marks on the checkboxes "Allow Remote Clients" and "Allow Outbound".
    0 讨论(0)
  • 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 '<<your linked server name>>', 'remote proc transaction promotion', 'false';
    
    0 讨论(0)
提交回复
热议问题