两台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段才出问题,希望兄弟们指点一下迷津,谢谢!

解决方案 »

  1.   

    估计是服务器不能解析c:\windows\system32\drivers\etc\路径下找到hosts。
    你映射一下对方的IP和机器名
      

  2.   

    查一下这 端口135是否正常MSDTC服务依赖于RPC(Remote Procedure Call (RPC))服务,RPC使用135端口,保证RPC服务启动,如果服务器有防火墙,保证135端口不被防火墙挡住。    使用“telnet IP 135 ”命令测试对方端口是否对外开放。也可用端口扫描软件(比如Advanced Port Scanner)扫描端口以判断端口是否开放。
      

  3.   

    1、135端口已检查过是开着的
    2、c:\windows\system32\drivers\etc\路径下找到hosts也已经新增一行,添加了ip  计算机名但还是不行,请问还有什么设置吗?两台机其实在同一内网,只是分了不同的IP段而已,如果将机器改成同一IP段是没问题,可以正常运行的,只是将IP段改成不同,问题就出来了
      

  4.   

    --不同服务器数据库之间的数据操作
    --************************************************************************************
    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 ' 
      

  5.   

    服务器之间有做链接的啊,而且同一IP段是没问题的,只是改了不同IP段才出错
      

  6.   

    hosts文件 
    輸入是否正確
    其中IP 是对方服务器的IP地址,ServiceName是对方服务器的Sql Server服务名称?兩台機需要相互Ping通
      

  7.   

    估计还是地址解析的问题.
    你的不同网段是什么意思?按理,不同网段应该是要在不同的路由器下面,每个路由必须指定网段IP范围和网关,但我看楼主的网段地址仍是192.168.0.x,也就是说,这个不同的网段是你们自己设置的.
    或许,是你们网络设置得不对.
    建议找有组网经验的同事好好设置一下局域网,保证网络设置没问题,然后再去考虑分布事务的事情.
    仅猜测,没有低估楼主水平的意思.
      

  8.   

    1、两台机在不同网段下是可以互相ping通的。
    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
      

  9.   

    ERROR MESSAGE 4 - There are no more endpoints from the endpoint mapper    DTCping log file: C:\Documents and Settings\username\Desktop\DTC_PING\TURTLES8626
        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
      

  10.   

    估計還是地址解析的問題,樓主互Ping一下對方的主機名稱,是否能Ping通。
      

  11.   

    可以的啊,而且都在hosts加了对方的地址和计算机名
      

  12.   

    在host里做正确的映射,然后再在configuration manager给对方建立别名。
    还不行的话,参考一下:http://blog.sina.com.cn/s/blog_70cb40d00100mxbk.html