2 Replies Latest reply: Jun 21, 2008 5:45 AM by 589859 RSS

    ORA-12170: TNS:Connect timeout occurred

      We are experiencing the following error with a C# application trying to connect to our Oracle Database:
      ORA-12170: TNS:Connect timeout occurred    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure)
         at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src)
         at Oracle.DataAccess.Client.OracleConnection.Open()
         at ADF_Controller.DbHelper.UpdateJobEventsTable()
      the C# application is a file watcher just polling certain directories for files. When a file is put in one of the watched directories, the application picks it up and attempts to load its contents into Oracle. The database version is

      This process has been working for about 3 months, and then in the last 2 weeks we started to encounter issues. Please note that for the majority of the time, this process works, i.e. the c#application connects succesfully to Oracle, but occasionally we get this ORA-12170 error.

      I have tried to investigate what this issue may be - some sources suggest the sqlnet.ora file. The contents of the sqlnet.ora file that the c#application uses is listed below:
      # sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\client_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.
      Please can anyone provide any insight as to what maybe causing this issue?

      Many thanks
        • 1. Re: ORA-12170: TNS:Connect timeout occurred
          Error:     ORA-12170 (ORA-12170)
          Text:     TNS:Connect timeout occurred
          Cause:     The server shut down because connection establishment with a
               client failed to complete within the allotted time interval. This
               may be a result of network/system delays; or this may indicate
               that a malicious client is trying to cause a Denial of Service
               attack on the server.
          Action:     If the error occurred because of a slow network/system,
               reconfigure the SQLNET.INBOUND_CONNECT_TIMEOUT parameter in
               sqlnet.ora to a larger value. If a malicious client is suspected,
               use the address in sqlnet.log to identify the source and restrict
               access. Note that logged addresses may not be reliable as they can
               be forged (e.g. in TCP/IP).

          Set SQLNET.INBOUND_CONNECT_TIMEOUT to a larger value,it defaults to 60s. Value must be specified in seconds.

          • 2. Re: ORA-12170: TNS:Connect timeout occurred

            I presume I can just add the following to the sqlnet.ora file:
            i.e three minutes before timing out.

            Many thanks