This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Oct 6, 2010 11:22 AM by 803553 RSS

ERROR ORA-12170: TNS:Connect timeout occurred

490126 Newbie
Currently Being Moderated
I have this error "ERROR ORA-12170: TNS:Connect timeout occurred" when connecting as user/pwd@instance, but I am able to connect only with the user. What I am doing wrong??

Example:
#sqlplus /nolog
SQL> connect myuser/mypassword@myinstance
ERROR:ORA-12170: TNS:Connect timeout occurred

SQL> connect myuser
Enter password: ***********
Connected.
  • 1. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    27876 Newbie
    Currently Being Moderated
    if you have a firewall enabled on that system, try disabling the firewall and try again.
  • 2. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    490126 Newbie
    Currently Being Moderated
    No, there isn't any firewall between client and server, they are in the same machine.
  • 3. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    27876 Newbie
    Currently Being Moderated
    Do you have firewall installed on your system?
    what operting system are you using?
    what is the name of the tns entry for the database you are connecting to?
    do you have a listener configured?
    what do you get for this:
    C:\> tnsping tns_entry_name
    ?
  • 4. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    490126 Newbie
    Currently Being Moderated
    Hi,

    The OS is Solaris 9 and I'm get the following response from BGW

    % tnsping BGW
    TNS Ping Utility for Solaris: Version 10.1.0.3.0 - Production on 13-FEB-2006 09:44:30
    Copyright (c) 1997, 2003, Oracle. All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = bgw)))
    OK (50 msec)
    %
  • 5. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    451529 Newbie
    Currently Being Moderated
    Hi

    u are using the Solaris .. As i think u have a exported system variable ORACLE_SID . so u dont have to give a SID with the connect straing...

    And in unix based servers its good habit to export the ORACLE_SID first..


    rgds
    Ashish
  • 6. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    93654 Newbie
    Currently Being Moderated
    Have you checked sqlnet.ora file is there any timeout setting there.

    Example:
    SQLNET.INBOUND_CONNECT_TIMEOUT=3

    -Sri
  • 7. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    27876 Newbie
    Currently Being Moderated
    What do you get when you try to do this:
    sqlplus username/password@BGW
    ?
  • 8. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    532263 Newbie
    Currently Being Moderated
    ORA-12170:TNS:connect timeout occurred.

    I get this error every where. I can't conect to database.

    I just install 10g database.
  • 9. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    440025 Newbie
    Currently Being Moderated
    See if this help?

    ORA-12170: TNS:Connect timeout occurred

    Cause: The client failed to establish a connection and complete authentication in the time specified by the SQLNET.INBOUND_CONNECT_TIMEOUT parameter in the sqlnet.ora file. This error may be a result of network or system delays, or it may indicate that a malicious client is trying to cause a denial-of-service attack on the database server.

    See Also:
    "Configuring the Listener and the Oracle Database To Limit Resource Consumption By Unauthorized Users" for further information about setting the SQLNET.INBOUND_CONNECT_TIMEOUT parameter


    Action: If the error occurred due to system or network delays that are normal for the particular environment, then perform these steps:

    Turn on tracing to determine where clients are timing out.

    See Also:
    "Oracle Net Services Tracing Error Information"


    Reconfigure the SQLNET.INBOUND_CONNECT_TIMEOUT parameter in sqlnet.ora to a larger value.

    If you suspect a malicious client, then perform these steps:

    Locate the IP address of the client in the sqlnet.log file on the database server to identify the source.

    For example, the following sqlnet.log excerpt shows a client IP address of 10.10.150.35.

    Fatal NI connect error 12170.

    VERSION INFORMATION:
    TNS for Solaris: Version 9.2.0.2.0 - Production
    Oracle Bequeath NT Protocol Adapter for Solaris: Version 9.2.0.2.0 -
    Production
    TCP/IP NT Protocol Adapter for Solaris: Version 9.2.0.2.0 - Production
    Time: 03-JUL-2002 13:51:12
    Tracing to file: /ora9i/trace/svr_13279.trc
    Tns error struct:
    nr err code: 0
    ns main err code: 12637
    TNS-12637: Packet receive failed
    ns secondary err code: 12604
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Client address:
    (ADDRESS=(PROTOCOL=tcp)(HOST=10.10.150.35)(PORT=52996))


    Beware that an IP address can be forged.

    If the timeout occurs before the IP address can be retrieved by the database server, then enable listener tracing to determine the client that made the request.

    See Also:
    "Oracle Net Services Tracing Error Information"


    Restrict access to the client. For example, you can configure parameters for access rights in the sqlnet.ora file.

    See Also:
    "Configuring Database Access Control"

    http://download-west.oracle.com/docs/cd/B10501_01/network.920/a96580/troubles.htm
  • 10. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    529970 Newbie
    Currently Being Moderated
    Hi,
    I think you are using this command on oracle server.
    If you are using on oracle server there is no requirement of host string at connect only use username/password.
    rahul
  • 11. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    user587133 Newbie
    Currently Being Moderated
    I to am facing the same issue now

    I have catalogued database Dev to my machine and service name is Sample

    When I connect as scott/tiger@Sample

    It shows timedout


    [oracle@test bin]$ tnsping Sample

    TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 04-JUL-2008 08:26:45

    Copyright (c) 1997, 2005, Oracle. All rights reserved.

    Used parameter files:
    /u01/app/oracle/product/10.2.0/client_1/network/admin/sqlnet.ora

    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.17.3.65)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DEV)))
    TNS-12535: TNS:operation timed out
  • 12. ERROR ORA-12170: TNS:Connect timeout occurred
    657360 Newbie
    Currently Being Moderated
    Hi,

    I am facing the same error, below is my specifications

    1- I have 2003 server with 9i DB installed and it's the active directory at the same time with specific IP address.
    2- I have a win Xp as a client in the domain, have the 6i and 10g developers installed.

    when I try to configure the TNS name for the client to connect to ORCL as sid for the database the ORA-12170: TNS:Connect timeout occurred shown up.

    I tried to change the parameter of the sqlnet.inbound_connect_timeout = 100, as shown i set it to 100 insted of the default 3.

    I also checked out the firewall and I guess everything is going well while i can ping the server and also view it's files from the client PC.

    thank you for your support to find an appropriate solution and end my suffering :) .
  • 13. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    640984 Newbie
    Currently Being Moderated
    i m getting the above ora-12170 error

    SQLNet.log is
    Fatal NI connect error 12170.

    VERSION INFORMATION:
         TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
         Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
         Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production
    Time: 20-FEB-2009 09:21:03
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12535
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12609
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.7)(PORT=1257))


    My SQLNER.ora is
    # sqlnet.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.

    #SQLNET.AUTHENTICATION_SERVICES= (NTS)

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    SQLNET.INBOUND_CONNECT_TIMEOUT=360
    SQLNET.RECV_TIMEOUT=10
    SQLNET.SEND_TIMEOUT=10

    Listener.ora is
    # listener.ora Network Configuration File:

    D:\oracle\product\10.2.0\db_1\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc)
    )
    )

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.7)(PORT = 1521))
    )
    )

    I got Oracle 10g Release 2 on Windows 2003 Server
    Kindly provide some help
  • 14. Re: ERROR ORA-12170: TNS:Connect timeout occurred
    697983 Newbie
    Currently Being Moderated
    I had the same issue with my oracle 10.2.0.3 installed.
    I had to disable the security or had to open 1521 port number on the server so that we can connect to the database from client machine.
1 2 Previous Next