Web Service 使用分布式事务出错(OLE DB provider 'SQLOLEDB'无法启动分布式事务)

本文介绍了在WindowsXPSP2环境下,使用SqlServer2000搭建WebService时遇到的分布式事务问题。具体表现为应用服务器访问远程数据库时无法开始分布式事务。文章详细记录了解决此问题的步骤,包括配置MSTDC、调整服务登录账户等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

    环境 Windows XP SP2 Sql Server 2000
    问题描述:在搭建Web Service时,访问了远程数据库的Link Server(即应用服务器访问了两台数据库服务器),执行SQL语句,如下:
      begin   transaction
    select CNCJ.dbo.Custmoer.TotalVol FROM  CNCJ.dbo.Customer c1 left join OrderHeaderID o1 on c1.OrderID = o1.OrderID  
WHERE or.CustomerProfileID = '188168' and o1.AggType = 'PPV' and o1.OrderMonth = '200805'
    commit   tran  
    go 
   
    CNCJ为数据库服务器上的Link Server
 
    出错   
    The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
    [OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
    OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].
 
  解决办法
  1. 在数据库服务器上打开Sql Server的企业管理器,展开,右键“Local(Windows NT)”属性,确定“自动启动MSTDC”勾上。
  2. 管理工具->组件服务->计算机->我的电脑,右键属性,MSTDC选项卡,点击按钮“Security Configuration..”,勾上Newwork DTC Access, Allow Remote Clients、Allow Remote Administration、Allow Inbound、Allow Outbound、No Authentication Required、Enable Transaction Internet Protocol(TIP) Transactions、Enable XA Transactions,Account:为NT AUTHORITY/Newwork Service
  3. 管理工具->服务->找到Distributed Transaction Coordinator,双击,选择“Log on”选项卡,确保This account为NT AUTHORITY/Network Server。
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值