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: NAMES.DIRECTORY_PATH=(HOSTNAME, TNSNAMES, ...)
Now we are trying to make a connection:
H:\>sqlplus email@example.com SQL*Plus: Release 220.127.116.11.0 Copyright (c) 1982, 2008, Oracle. All rights reserved. ERROR: 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:
C:\>ping down.be.dbmotive.com Pinging down.be.dbmotive.com [192.168.10.1] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 192.168.10.1: 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.