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..”,勾上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。
最后更新:2017-04-02 00:06:46
上一篇:
[示例]存储过程循环与用户自定义函数递归调用
下一篇:
打造自己的checkinstall
API Demos 2.3 学习笔记 (5)-- Text->LogTextBox
使用JS禁用浏览器后退按钮
Android Manifest.xml文件解析
2017最新鑫众棋牌源码:含最新版游戏大厅+手机版网站+手机端大厅+代理系统+超强后台
应对Memcached缓存失效,导致高并发查询DB的几种思路
关于webStrom-11.1配置less且自动生成.css和自动压缩为.min.css/.min.js
/usr/bin/ld: cannot find -lltdl collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Err
最完整的网狐棋牌-新手零基础教程 第五节 大厅源码的编译和修改教程
Mysql简介及概念
手机系统应用开发商有哪些