FirewalldSQLNET

How to Resolve TNS-12535: TNS:operation timed out

TNS-12535

Let’s see how we reproduce TNS-12535.

C:\Users\ed>tnsping compdb

TNS Ping Utility for 64-bit Windows: Version 12.1.0.1.0 - Production on 22-JUL-2014 19:03:21

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

Used parameter files:
C:\oracle\app\client\ed\product\12.1.0\client_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = primary01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = compdb)))
TNS-12535: TNS:operation timed out

Causes

TNS-12535 means the connect identifier can be found in tnsnames.ora and the hostname is resolvable by DNS or /etc/hosts, but somehow network problems make the connection timed out.

There could be several causes of TNS-12535 that I listed below.

  1. The hostname in the connect descriptor of compdb points to a wrong IP address.
  2. The port specified in the connect descriptor of compdb points to a wrong port.
  3. The port specified in the connect descriptor of compdb is not opened on firewall of the database server.
  4. Any other anti-virus software on clients.

Solutions

  1. Check your DNS, /etc/hosts or C:\Windows\System32\drivers\etc\hosts file to make sure the IP mapping is correct.
  2. Open the port 1521.
  3. Revert any changes of security policy on network appliances including IPS, IDS and firewall.

For more connection troubleshooting, you may refer to Oracle 18c Net Services Administrator’s Guide: 15 Testing Connections.

Leave a Reply

Your email address will not be published. Required fields are marked *