OLE DB提供程序“SQLNCLI11”对于链接服务器“"返回消息“没有事务处于活动状态。” [英] OLE DB provider "SQLNCLI11" for linked server "" returned message "no transaction is active.".

查看:1109
本文介绍了OLE DB提供程序“SQLNCLI11”对于链接服务器“"返回消息“没有事务处于活动状态。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

你能帮我吗,PLZ?

客户:Win 10和SQL 2014

服务器:赢取2012和SQL 2012



Hi everyone,
Can you help me, plz?
Client: Win 10 and SQL 2014
Server: Win 2012 and SQL 2012

SET XACT_ABORT ON
begin distributed transaction
select top 10 * from [210_2k12].master.sys.objects
ROLLBACK





我尝试过:



问题与解决方案:FIX:在SQL Server 2005或SQL Server 2008中运行分布式查询时出现错误消息:OLE DB提供程序'SQLNCLI'用于链接服务r''返回消息'没有事务处于活动状态' [ ^ ]

MSDTC故障排除:事务管理器已禁用其对远程/网络事务的支持 - Justin Cooney [ ^ ]

推荐答案

无需为简单的 SELECT 语句启动事务。因为该查询不会更改数据库中的任何内容,所以无法回滚。如果您必须对一个或多个表中的数据进行一次或多次更改,则必须使用 ROLLBACK 进行交易,并且必须将这些数据重置为其原始状态(如果其中一个)更改失败。
There is no need to start a transaction for a simple SELECT statement. Because that query doesn't change anything in your database there is nothing to roll back. Transactions with ROLLBACK are used if you have to make one or more changes to the data in one or more tables and you have to reset these data to it's original state if one of the changes fails.


这篇关于OLE DB提供程序“SQLNCLI11”对于链接服务器“"返回消息“没有事务处于活动状态。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆