公司在国外有一个Oracle数据库,版本8.1.7,已经和数据库所在的机器建立了VPN专线。通过远程桌面,可以登录到服务器上。但是通过TOAD连接数据库的时候,总是提示ORA-12535: TNS:operation timed out。
请问,这是怎么回事啊?在线急等~

解决方案 »

  1.   

    是客户端的问题啊! 现在国外那边说,他们做了测试,没有什么问题,现在也只能是从自己的客户端来找问题了.
    zgh2003(世纪飞扬) ,客户端会是什么问题?需要我给出哪些信息,才能方便大家帮助我?
      

  2.   

    tnsping 能通吗?你能从远程桌面连接,说明tcp/ip使用没有问题,那么就似乎客户端的配置了,配置一下oracle net试试,看看端口是否被占什么的
      

  3.   

    试过
          tnsping 数据库名 
    是通的。
    配置Oracle net,是指配置net连接么?端口会被什么占了,怎么看阿,不是端口只是涉及到
    服务器端的么?
    不好意思,刚刚接触^_^
      

  4.   

    这是我的tnsnames.ora的配置,请问怎么看是不是其他端口被占用了?# TNSNAMES.ORA Network Configuration File: C:\oracle\ora81\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ATRDUS =
       (DESCRIPTION =
         (ADDRESS_LIST =
           (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.60)(PORT = 1521))
         )
         (CONNECT_DATA =
           (SERVICE_NAME = atrdus)
         )
       )
      

  5.   

    没遇见过这样的情况,我曾经用过vpn不过是能ping通,但是tnsping不通,象你这样的问题真的是很诡异.一般tnsping能通除非是oracle实例没有启动否则不可能连不上啊
      

  6.   

    TNS-12535 TNS:operation timed out
    Cause: The requested connection could not be completed within the timeout
    period specified by the CONNECT_TIMEOUT parameter in LISTENER.ORA.
    This error arises from the TNSLSNR.
    Action: Either reconfigure CONNECT_TIMEOUT to be 0, which means wait
    indefinitely, or reconfigure CONNECT_TIMEOUT to be some higher value. Or,
    if the timeout is unacceptably long, turn on tracing for further information.
      

  7.   

    谢谢飞翔的鱼
    _______可能会是什么原因呢?谢谢nlzjy
    _______邮件告诉对方,说可能要把connect_timeout设为0,可是对方说,服务器端没有什么问题,他们也从Internet上做了测试,可以连接:( ,还可能有什么原因么?
      

  8.   

    你需要查找的地方:
    1.查看服务名配置中的服务名是否正确(利用net manager工具,那个服务名实际就是全局数据库名,即sid,注意这个全局数据库名可能带域名后缀);
    2.查看主机地址是否正确,一般填db服务器的Ip;
    3.查看端口填写是否正确,是db服务器的端口(这是常识 :) );
    以上都是在net manager窗口中查;
    4.查看一下本机防火墙是否挡住了.
      

  9.   

    纠正一下,第一点中:sid是sid,全局数据库名是全局数据名,全局数据库名类似sid.domain
      

  10.   

    我用的是Oracle8.1.7的客户端。没有找到net manager工具,找到了Net8 Assistant工具,可以用来设置。
    1.进入后,发现sid那一格是空的,不能填写内容。
    2.主机地址应该是正确的,可以tnsping通。
    3.端口是不是就是1521啊?
    4.我把防火墙关了。
    这几步这样做可以么?现在还是连不通,还会是什么原因啊?
      

  11.   

    我看你贴出来的tnsnames.ora没有问题,还有一点值得怀疑的地方是你的那个service_name,这个应该填全局数据库名,至于端口是否正确,那得看服务器监听配置的端口是多少了,建议你咨询管理服务器的人员,向他求证service_name及端口。
    另外,建议你在其他机器上测试下,看看是不是同样的问题出现。
      

  12.   

    tnsping 服务名 实际上tnsping的是服务名。我觉得如果再不行,是不是应该从网络方面考虑了。如对你通过Oracle提供得地址得解析等方面。
      

  13.   

    谢谢你世纪飞扬
    ——在国内其他机器上测过了,也出现了同样地问题,现在正在求证全局数据库名。谢谢nlzjy
    ——不知道你说的“Oracle提供得地址得解析”是怎么用的,是一种工具么?
      

  14.   

    大概找到原因了,下面一段资料说得比较详细。
    简单的说,就是tnsping能通过,是因为它检测了端口1521,这个端口也是开放的,所以能通过。
    建立连接的时候,windows会自动的将socket通道建立在系统自己决定的一个端口上,而不是1521,这时候,如果如果那个端口没有开放,就会出错。--哪位大侠能给出更好的解释或者解决方法,请不吝赐教啊!Sqlnet uses *two* ports, one to get in touch, one for the actual 
    communications. 
    The second port is determined *randomly*. 
    If that port isn't opened in the firewall (and why should it), you get 
    12535. 
    "Now that the client software knows where to connect to, it will open a 
    TCP/IP socket connection to the server with the hostname 
    localhost.localdomain on port 1521.  If the DBA for our server has 
    installed and configured Oracle Net, and has the listener listening on 
    port 1521 for connection requests, this connection may be accepted.  In 
    a network environment, we will be running a process called the TNS 
    listener on our server...  When it receives the inbound connection 
    request... [to a] dedicated server connection, the listener will create 
    a dedicated server for us.  On UNIX, this is achieved via a fork() and 
    exec() system call...  The new dedicated server process inherits the 
    connection established by the listener, and we are now physically 
    connected to the database.  On Windows, the listener process requests 
    the database process to create a new thread for a connection.  Once the 
    thread is created, the client is "redirected" to it, and we are 
    physically connected."