一同事在测试服务器(系统:Windows 2008 R2 Standard 数据库:SQL SERVER 2008 R2)通过链接服务器test使用分布式事务测试时出错,出错信息如下:

set xact_abort on

begin tran

update test.mydb.dbo.test_one set name='test' where  id= 3 ;

commit

OLE DB provider "SQLNCLI10" for linked server "test" returned message "The transaction manager has disabled its support for remote/network transactions.".

消息 7391,级别 16,状态 2,第 5 行

The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "test" was unable to begin a distributed transaction.

出现这个错误时因为这台服务器,或者链接服务器那台服务器没有配置好MS DTC(Microsoft Distributed Transaction Coordinator  微软 分布式事务协调器)。

    首先确保开启了 'remote access'、 'remote admin connections'、 'remote proc trans'选项。

  • exec sp_configure 'show advanced options',1;
  •  
  • go
  •  
  • reconfigure;
  •  
  • go
  •  
  • exec sp_configure 'remote access',1;
  •  
  • go
  •  
  • reconfigure;
  •  
  • go
  •  
  • exec sp_configure 'remote admin connections',1;
  •  
  • go
  •  
  • reconfigure;
  •  
  • go
  •  
  • exec sp_configure 'remote proc trans',1 ;
  •  
  • go
  •  
  • reconfigure;
  •  
  • go
  • 相关文章:

    • 2021-12-11
    • 2022-12-23
    • 2022-12-23
    • 2021-08-18
    • 2021-10-11
    • 2021-06-04
    • 2021-09-30
    猜你喜欢
    • 2022-03-04
    • 2022-12-23
    • 2021-05-15
    • 2021-10-13
    • 2021-06-15
    • 2021-12-09
    • 2021-06-20
    相关资源
    相似解决方案