Wednesday, April 23, 2008

TNS-12535: TNS:operation timed out

There might be sometime that when you try to connect to Oracle Server and you get the error "TNS-12535: TNS:operation timed out". It seem that the server does not exist or the listener does not start or both of them. The first thing you need to have a look is
the tnsnames.ora which could be found at
- $ORACLE_HOME/network/admin for unix like OS ie. every distribute of Linux, Solaris etc.
- ..\oracle\product\10.2.0\ for Windows Platform

in this tnsnames.ora will look like this

ora_service_name =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORA_Server)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORA_SID)
)
)

there are 2 things you need to have a look there.

The first one is to check if your Ora_SID is correct, if you don't know please contact your dba admin and ask for it.

The Second thing you need to take a look at is the HOST part host/ip parth (HOST=....) this is where your oracle server is.

If both Ora_SID and HOST are correct then try to ping the server to see if you can reach the server (there might be the case that the network admin turn the ping port of for security reason though, in this case you are behind firewall).

To make sure if you are really behind the firewall try telnet the server with this syntax
telnet server_IP 1521 ( or whatever your Oracle listening port is). If you get the following error

Connecting To your server_ipd...Could not open connection to the host, on port 1521:
Connect failed


then 90% you are behind firewall, please contact your network administrator to turn the firewall on port 1521 on.

0 comments: