SQL Server DT问与答
SQL Server DT问与答
文章出处: 发布时间:2005-02-26 Q: 假设我现在有2台SQL Server (Windows Server 2003 + SQL Server 200 sp3),分别叫DB01和DB02,互相信任,互相把对方加入了Linked Servers的列表,常规访问无任何问题,但是无法启用分布式事务,例子如下:
在DB01上运行下列SQL命令:
begin tran
select top 1 * from item
select top 1 * from db02.production.dbo.item
rollback tran
在第2个select语句处提示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].
把begin tran换成BEGIN DISTRIBUTED TRANSACTION,结果相同。
在这2台服务器上,已经同时启用了MS DTC服务,并在Component Service中设定了MS DTC各种安全支持选项全开(步骤如下:
1. Click Start, point to All Programs, point to Administrative Tools, and click Component Services.
2. In the Component Services console, expand Component Services, expand Computers, right-click My Computer, and then click Properties.
3. In the My Computer Properties dialog box, on the MSDTC tab, click Security Configuration.
4. In the Security Configuration dialog box, select the Network DTC Access check box, select the Network Administration check box, select the Network Transactions check box, select the Network Clients check box, select the Transaction Internet Protocol (TIP) Transaction check box, and then click OK.
5. Restart the computer.
)。
因为服务器正在运行任务,所以我没有重新启动(仅仅重新启动了DTC服务).
是什么原因导致无法启动事务呢?相关阅读:
多文件程序编译时头文件的使用方法
360浏览器等被金山毒霸网强制霸占问题解决
surface重装系统后,屏幕亮度不能调节,显示适配器出现黄色三角、windows hello不能正常使用
Failed to execute "C:learnC程序练习1.exe": Error 0: 操作成功完成。 请按任意键继续. . .问题解决
递归总结及斐波那契数列的实现
在SpingBoot中使用Redis对接口进行限流
在SpringBoot App中使用GoogleReCaptcha3过滤非法的请求
在springboot中使用Guava基于令牌桶实现限流
springboot jwt redis实现token刷新
使用spring-validation和@RequestParam(required = false)字符串默认值的校验问题原文地址:https://www.cnblogs.com/huqingyu/p/760585.html
最新文章
script标签的src属性
js和css的加载造成阻塞
jquery的CDN
mysql变量
存储过程和存储函数
thinkPHP5 日志的写入
css3 轮播图
thinkPHP5 验证码
数据库类型枚举(Enum)使用总结
ThinkPHP5.0中Request请求对象大全
热门文章
CSS3 弹性盒子用法
MySQL增、删、改的用法
PHP 面向对象的简单介绍
think PHP URL生成
thinkPHP定义路由
位、字节、字符的区别
指针的运算
指针的说明
&取地址运算符
指针的定义
Copyri