Msg 7391, Level 16, State 2, Procedure GetTaskList_sp, Line 53
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "TeamplateDB_LINK" was unable to begin a distributed transaction.
解决过程:
1、首先想到查看本地配置,
exec sp_configure 'show advanced options',1
go
RECONFIGURE with override
go
打开高级选项,将如下配置设置为1。
'remote access', 'remote admin connections', 'remote proc trans'。
错误仍然出现。
1、 按照网上的帮助,检查Appalication Server中DTC组件是否已安装。
打开Control Panel--àAdd/Remove Programs--àAdd/Remove Windows Componats --àApplication Server,选择Details..然后查看Enable Network DTC Access和Enable Network COM+ Access是否已勾选,但这两项都已安装。
2、 检查Distributed Transaction Coordinator服务是否已启动;
3、 MSDTC设置是否正确:
在run中运行:dcomcnfg
在Component Services对话框中展开Console root--àComponent Services--àComputers--àMy Computer,右击My Computer选择Properties.
在Detfaulter Properties 选项卡中,选取”Enable Distributed COM on the computer”,可以选取”Defaulter Authentication Level:”为connect,而”Defualt Impersonation Level:”为Identify.
在 MSDTC 选项卡中,press "Security Configuration..." button and then select what you need.
确保选中了下列选项:
Network DTC Access
Allow Remote Clinets 和 Allow Remote Admnistration
Allow Inbound 和 Allow OutBound
Enable Transaction Internet Protocal(TIP)Transactions
Enable XA Transactions
而DTC Logon Account一定要设置为”NT Authority\NetworkService”
选择”No Authentication Required”
7.检查两台服务器但都在同一域中,网上有提到是否为可信任的连接,经测试,nbtstat –a IP 无法获得对方服务器的计算机名,相信与这个有关,所以在Hosts做一个映像:c:\windows\system32\drives\etc\hosts.
曾经一次出现之类问题时完成第7步就OK了!
8. 有一次出现7391错误时经过上述检查,仍然有错误,做如下命令即成功了!
EXEC sp_addserver '远程服务器名'
exec sp_setnetname '远程服务器名','网络服务器名'
(sys.servers 中的网络名称设置为用于远程 SQL Server 2005 实例的实际网络计算机名,该过程可用于启用对计算机)的远程存储过程调用执行)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9932141/viewspace-608037/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9932141/viewspace-608037/