Knowledge Base

Check network and firewall

ORA-12170: TNS:Connect timeout occurred

This usually happens when there are network problems, or the server is not reachable (due to a firewall issue, network problem, …).

You might want to check if there is no firewall available that blocks connections to the database server (typically on port 1521), or if the port returned by the listener is not open.

Another possibility is that you accidentally rely on the HOSTNAME feature of sqlnet.ora.
If there is no sqlnet.ora defined, one of the lookup methods used by the TNS networking (apart from tnsnames, oracle names server, oracle internet directory, …) libraries is hostname lookup.

When the server is not reachable for some reason, you will also get this error.

Either there is no sqlnet.ora in the %ORACLE_HOME%/network/admin directory, or the sqlnet.ora contain following entry:

Now we are trying to make a connection:

H:\>sqlplus system/
SQL*Plus: Release

Copyright (c) 1982, 2008, Oracle.  All rights reserved.

ORA-12170: TNS:Connect timeout occurred

We made a typo and incorrectly used a server name (physical machine) instead of a service name (database name).
Because HOSTNAME is also defined in sqlnet.ora, it tries to connect to the listener on the default port to see if there are available database services.

But our physical server is down at the moment:


Pinging [] with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

So either check that you are not using a hostname by mistake which is not available, or check for network/firewall problems.

Oracle Gold Partner DbMotive is an Oracle Silver Partner