两台SERVER2003+SQL2005的服务器,如果在同一IP段什么问题也没有,如果把他改成不同的IP段,就会出现以下错误:链接服务器"192.168.0.243"的 OLE DB 访问接口 "SQLNCLI" 返回了消息 "没有活动事务。"。
消息 7391,级别 16,状态 2,过程 aa,第 10 行
无法执行该操作,因为链接服务器 "192.168.0.243" 的 OLE DB 访问接口 "SQLNCLI" 无法启动分布式事务。
两台服务器的MSDTC都已经开启了,请问各位这是什么问题?如果同一IP段绝对没问题,就是改成不同IP段才出问题,希望兄弟们指点一下迷津,谢谢!
消息 7391,级别 16,状态 2,过程 aa,第 10 行
无法执行该操作,因为链接服务器 "192.168.0.243" 的 OLE DB 访问接口 "SQLNCLI" 无法启动分布式事务。
两台服务器的MSDTC都已经开启了,请问各位这是什么问题?如果同一IP段绝对没问题,就是改成不同IP段才出问题,希望兄弟们指点一下迷津,谢谢!
解决方案 »
- 复杂的查询排序
- 一个棘手的问题:如何编写存储过程,实现插入多行数据?
- 求解决方案:数据量比较大,要求每月底进行月统计,更新月统计表。然后程序都去读取月统计表,而不是去读每天的记录再在程序中进行月统计。请问什么方式进行月统计
- SQL Server中判断为是否空的奇怪现象????????
- 高分求教:怎样把本地计算机数据(格式:Access2000)传入远程SQL Server2k数据库中
- 我的数据丢失了一条,为什么?
- 有关SQL的问题……特急的,现在还在加班呢……
- 如何制作这样的安装程序?
- 一个sql的写法,超难,解决即结帖
- 关于oracle的安装
- [多条件分组,取最新型号]
- sql 存储过程动态构造,报错求解??
你映射一下对方的IP和机器名
2、c:\windows\system32\drivers\etc\路径下找到hosts也已经新增一行,添加了ip 计算机名但还是不行,请问还有什么设置吗?两台机其实在同一内网,只是分了不同的IP段而已,如果将机器改成同一IP段是没问题,可以正常运行的,只是将IP段改成不同,问题就出来了
--************************************************************************************
1、--创建链接服务器
exec sp_addlinkedserver 'ITSV', ' ', 'SQLOLEDB', '远程服务器名或ip地址 '
exec sp_addlinkedsrvlogin 'ITSV', 'false ',null, '用户名', '密码'
2、启动两台服务器的MSDTC服务
MSDTC服务提供分布式事务服务,如果要在数据库中使用分布式事务,必须在参与的双方服务器启动MSDTC(Distributed Transaction Coordinator)服务。3、打开双方的135端口
MSDTC服务依赖于RPC(Remote Procedure Call (RPC))服务,RPC使用135端口,保证RPC服务启动,如果服务器有防火墙,保证135端口不被防火墙挡住。
使用“telnet IP 135”命令测试对方端口是否对外开放。也可用端口扫描软件(比如Advanced Port Scanner)扫描端口以判断端口是否开放
4、--如要创建触发器
create trigger t_test on test
for insert,update,delete
as
--加上下面两句,否则会提示新事务不能登记到指定事务处理器
set xact_abort on
begin distributed tran
delete from openrowset('sqloledb','xz';'sa';'',test.dbo.test)
where id in(select id from deleted)
insert into openrowset('sqloledb','xz';'sa';'',test.dbo.test)
select * from inserted
commit tran--查询示例
select * from ITSV.数据库名.dbo.表名 --导入示例
select * into 表 from ITSV.数据库名.dbo.表名 --以后不再使用时删除链接服务器
exec sp_dropserver 'ITSV ', 'droplogins '
輸入是否正確
其中IP 是对方服务器的IP地址,ServiceName是对方服务器的Sql Server服务名称?兩台機需要相互Ping通
你的不同网段是什么意思?按理,不同网段应该是要在不同的路由器下面,每个路由必须指定网段IP范围和网关,但我看楼主的网段地址仍是192.168.0.x,也就是说,这个不同的网段是你们自己设置的.
或许,是你们网络设置得不对.
建议找有组网经验的同事好好设置一下局域网,保证网络设置没问题,然后再去考虑分布事务的事情.
仅猜测,没有低估楼主水平的意思.
2、使用DTCPing发现这样一个错误:A作为客户端(按ping键)
Log from Test client:TESTSERVER
Start DTC connection test with remote host as 192.168.1.9
192.168.1.9 is resolved to 192.168.1.9This IP address is back traced to sx1_serverInvoking RPC method on 192.168.1.9
Problem:fail to invoke remote RPC method
Error(status=1753): at dtcping.cpp (Line:265)RPC pinging failure
Description:1753-终结点映射器中没有更多的终结点可用。
Invalid partner CID while constructing binding handle
RPC server is ready Please Start Partner DTCping before pinging
++++++++++++Validating Remote Computer Name++++++++++++
Please refer to following log file for details: C:\Documents and Settings\username\Desktop\DTC_PING\TURTLES86268.log
Invoking RPC method on turtle86
Problem:fail to invoke remote RPC method Error(0x6D9) at dtcping.cpp @303
-->RPC pinging exception -->1753(There are no more endpoints available from the endpoint mapper.)
RPC test failed This error makes it appear that RPC is running out of DCOM Ports but you should not infer this error as a port exhaustion immediately. If you are able to run DTCPING.EXE on both the machines and during startup of the EXE, the tool doesn't complain of an out of port error, then this error is just a result of Firewall blocking the ports and the troubleshooting for this error should be exactly same as troubleshooting the "The RPC server is unavailable" error which is described above. Why am I saying that? Let's say that we are running out of DCOM ports (which can typically happen if you have specified a port range and the range is too small, something less than 30), then you should see an error the moment you start the DTCPING.EXE. Because that's when the DTCPing.exe will contact the End Point Mapper service (RpcSS) and ask for a dynamic port. If the DTCPing.exe starts up just fine, then it means that it got the right port allocated to it and hence there is no question of the Endpoint Mapper running out of DCOM ports.参考:
http://blogs.msdn.com/b/distributedservices/archive/2008/11/12/troubleshooting-msdtc-issues-with-the-dtcping-tool.aspx
还不行的话,参考一下:http://blog.sina.com.cn/s/blog_70cb40d00100mxbk.html