ORA-12170: TNS:Connect timeout occurred
The client tried to reach the database and got no answer in time. Usually a firewall silently drops the packets, or the host or port is wrong. Test whether the port is reachable from the client’s own machine.
What ORA-12170 means
Unlike ORA-12541, where the server actively refuses the connection, here nothing answers at all. A silent drop is typical of firewalls and of VPN routes that do not reach the server. ORA-12170 can also mean the server was too busy to accept the connection in time.
Common causes of ORA-12170
- A firewall between client and server blocking port 1521.
- A wrong host name or IP address, or the VPN not being connected.
- A server that is down or unreachable on the network.
- A busy server or listener not answering within the timeout.
How to fix ORA-12170
- Test the port from the client:
nc -vz host 1521, orTest-NetConnectionon Windows. - Check that the name resolves to the right address.
- Check the VPN and firewall rules, on the server host too.
- If the network is fine, see whether the server is overloaded and check the listener log.
ORA-12170 example
Is the port reachable?
# macOS / Linux
nc -vz db-host.example.com 1521
# Windows PowerShell
Test-NetConnection db-host.example.com -Port 1521
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-12541ORA-12154ORA-03113 All Oracle errors →
Oracle documentation for ORA-12170. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.