MS SQL 错误:The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server...

   一同事在测试服务器(系统: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'选项。

Code Snippet
  1. exec sp_configure 'show advanced options',1;
  2.  
  3. go
  4.  
  5. reconfigure;
  6.  
  7. go
  8.  
  9. exec sp_configure 'remote access',1;
  10.  
  11. go
  12.  
  13. reconfigure;
  14.  
  15. go
  16.  
  17. exec sp_configure 'remote admin connections',1;
  18.  
  19. go
  20.  
  21. reconfigure;
  22.  
  23. go
  24.  
  25. exec sp_configure 'remote proc trans',1 ;
  26.  
  27. go
  28.  
  29. reconfigure;
  30.  
  31. go

配置DTC步骤

Step 1:Start(开始)-Control Panel(控制面板)-System and Security(系统和安全)- Administrative Tools(管理工具)-Component Services(组件服务)(或者Run->dcomcnfg 直接跳出组件服务)。

  进入界面点击(Console Root->Componet Services->Computers->My Computer-> Local DTC)

Step 2: 右键单击"Local DTC"的属性,就可以看到“Tracing”、“Logging”、“Security”三个面板。关于设置属性。可以点击下面的“Learn more about setting these properties”

如下所示,一般只用设置“Security”下的属性,具体情况,根据实际情况配置,可以参考下面“本地DTC属性页:“安全选项”卡说明

 

image

注意:如果服务器开启了防火墙,那么必须确保防火墙是否开放了135端口(即允许Distributed Transaction Coordinator程序通过防火墙)

参考资料:

http://blog.csdn.net/wobuwei/article/details/4352792

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值