我正在尝试对链接的服务器运行SQL,但是出现以下错误:
BEGIN DISTRIBUTED TRANSACTION
SELECT TOP 1 * FROM Sessions
OLE DB provider "SQLNCLI" for linked server "ASILIVE" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "ASILIVE" was unable to begin a distributed transaction.
提供程序返回了两个错误:
错误1:
Number: $80040E14
Source: Microsoft OLE DB Provider for SQL Server
Description: OLE DB provider "SQLNCLI" for linked server "ASILIVE" returned message "No transaction is active.".
HelpFile:
HelpContext: $00000000
SQLState: 01000
NativeError: 7412
错误2
Number: $80040E14
Source: Microsoft OLE DB Provider for SQL Server
Description: The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "ASILIVE" was unable to begin a distributed transaction.
HelpFile:
HelpContext: $00000000
SQLState: 42000
NativeError: 7391
我如何让Microsoft偏爱功能而非安全性?
或者,至少,如何使两个SQL Server相互通信?
相关问题
- 由于OLE DB提供程序“ SQLNCLI10” ...(*链接的服务器名称为
(null)
),所以无法执行该操作 - 分布式事务错误?(使用Oracle提供程序)
- 无法使用NHibernate参与分布式事务(使用Hibernate)
- 在SQL Server 2008 R2中使用分布式事务时出错(SQL Server 2008 R2,无答案)
- 仅通过代码的分布式事务错误(由连接池引起)
- 在链接服务器中执行分布式事务处理协调器时出错(SQL Server 2008,没有答案)
- 分布式事务错误?(没有可接受的答案;仅答案无济于事)
- 如何使用链接服务器内部事务插入远程表?(接受的答案无法解决)
我已经做是无关紧要的,但无论如何,我会张贴。
被诅咒和发誓。
砸东西。
检查一个
SELECT
可以使用链接服务器:SELECT * FROM ASILive.CustomerManagementSystem.dbo.Users .... (763 row(s) affected)
-
C:\Documents and Settings\avatar>ping asicmstest.contoso.com Pinging asicmstest.contoso.com [10.0.0.40] with 32 bytes of data: Reply from 10.0.0.40: bytes=32 time<1ms TTL=128 Reply from 10.0.0.40: bytes=32 time<1ms TTL=128 Reply from 10.0.0.40: bytes=32 time<1ms TTL=128 Reply from 10.0.0.40: bytes=32 time<1ms TTL=128 Ping statistics for 10.0.0.40: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
检查远程服务器是否可以按名称通讯回启动服务器:
C:\Documents and Settings\avatar>ping asitestserver.contoso.com Pinging asitestserver.contoso.com [10.0.0.22] with 32 bytes of data: Reply from 10.0.0.22: bytes=32 time<1ms TTL=128 Reply from 10.0.0.22: bytes=32 time<1ms TTL=128 Reply from 10.0.0.22: bytes=32 time<1ms TTL=128 Reply from 10.0.0.22: bytes=32 time<1ms TTL=128 Ping statistics for 10.0.0.22: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
检查
@@SERVERNAME
两个服务器上的服务器名称是否匹配:SELECT @@SERVERNAME, SERVERPROPERTY('MachineName') ------------- ------------- ASITESTSERVER ASITESTSERVER
和
SELECT @@SERVERNAME, SERVERPROPERTY('MachineName') ---------- ---------- ASIGROBTEST ASIGROBTEST
尖叫
-
SET XACT_ABORT ON GO BEGIN DISTRIBUTED TRANSACTION SELECT TOP 1 * FROM Sessions
-
HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer
在两个服务器上。