Monday, August 6, 2018

ORA-12170 : TNS:Connect timeout occurred


If your application (or SQLPLUS) is returning ORA-12170 while connecting to the database, there are a few things that you can verify in order to find out the root cause of the issue, and implement a solution. Although sometimes it is quite difficult to find out the root cause, I will discuss some major and quite common causes of this error message that cause failure of application to connect with the database.
  • At the client side, check if you are using correct host name or IP address of the database server you are trying to connect. ADDRESS field of TNS service should reflect correct host name or IP address.
  • SALMAN12C =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = salman-pc.mydomain.com)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = salman12c)
        )
      )
  • Check if the database host name/IP is resolvable from the client side. Use either DNS for the name resolution, or “host” file of the client side to resolve the database server name with the IP address. Client host should also be resolvable from the database server and you can add client host name in the /etc/host file of the database server (if you are not using DNS)
  • If the database host name is not resolvable from the client, use IP address in the TNS service instead of host name.
  • Use “ping” command from the client side to check the network connectivity with the database server.
  • Check if there is an anti-virus running on client machine or the database server. There is a possibility that antivirus may be causing connectivity issues between client and the database server.
  • Lastly, check if listener log file has become very huge that could also cause ORA-12170.

No comments:

Post a Comment

Popular Posts - All Times