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

简介:

 环境 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..” ,勾上 New work 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。
目录
相关文章
在 CRM WebClient UI Attachment 区域,创建支持 Web Service 的 Word 文档
在 CRM WebClient UI Attachment 区域,创建支持 Web Service 的 Word 文档
|
12月前
phpstorm插件应用:Test RESTful WEB Service 控制台接口调试工具
phpstorm插件应用:Test RESTful WEB Service 控制台接口调试工具
146 0
|
24天前
|
JavaScript 前端开发 定位技术
Rest风格WEB服务(Rest Style Web Service)的真相
Rest风格WEB服务(Rest Style Web Service)的真相
34 1
|
4天前
|
运维 关系型数据库 分布式数据库
技术选型思考:分库分表和分布式DB(TiDB/OceanBase) 的权衡与抉择
技术选型思考:分库分表和分布式DB(TiDB/OceanBase) 的权衡与抉择
|
2月前
|
XML API 网络架构
Web Service和Web API理解和使用场景
**Web Service**是一种基于网络、使用SOAP协议和XML的数据封装的重服务,适用于跨平台、跨语言的企业系统集成,尤其在安全性和事务处理严格的场景,如银行系统。而**Web API**是轻量级的HTTP接口,常遵循REST原则,使用JSON格式,适合移动应用、开放平台和微服务间的通信,因其简洁高效。选择哪种取决于项目需求,Web Service适合复杂交互,Web API则流行于现代Web应用。
|
2月前
|
缓存 应用服务中间件 数据库
Python Web Service开发及优化
随着互联网的快速发展,Web服务已成为现代技术的核心。Python作为一种功能强大且易于学习的编程语言,在Web服务开发领域占据着重要地位。Python Web服务开发的重要性在于它能够提供高效、可扩展且易于维护的解决方案。本篇博客将探讨如何使用Python的Flask框架、Gunicorn WSGI服务器和Nginx网页服务器来实现高性能的Web服务。
|
9月前
|
JSON 安全 API
使用 ABAP sproxy 事务码生成的 Proxy 消费 Web Service
使用 ABAP sproxy 事务码生成的 Proxy 消费 Web Service
|
2月前
|
XML 网络架构 数据格式
Ruby 教程 之 Ruby Web Service 应用 - SOAP4R 2
Ruby Web Service 应用 - SOAP4R
37 5
|
2月前
|
XML 存储 数据格式
如何在 CRM Assignment block 里创建支持 Web Service 的 PDF 附件
如何在 CRM Assignment block 里创建支持 Web Service 的 PDF 附件
|
2月前
|
存储 缓存 算法
关于 Service Worker 和 Web 应用对应关系的讨论
关于 Service Worker 和 Web 应用对应关系的讨论

热门文章

最新文章