Oracle SQL Error 17002 (SQLState 08006) indicates the JDBC client cannot establish or maintain a network connection to the Oracle database listener.
Oracle SQL Error 17002 (SQLState 08006) means the JDBC driver lost or failed to create a TCP connection to the database listener. Check network reachability, listener status, firewall rules, and JDBC URL; then restart the connection to resolve the issue.
ORA-17002: IO Error: The Network Adapter could not establish the connection (SQLState 08006)
SQL Error 17002, mapped to Oracle ORA-17002 and SQLState 08006, signals a transport-level failure between a JDBC client and the Oracle listener. The driver attempted to open or sustain a socket, but the hand-shake never completed or was broken abruptly.
Because the fault lies below SQL parsing, no SQL statement is ever executed.
All subsequent database work in the same session fails until a new connection is negotiated.
Network interruptions, firewalls, invalid hostnames, or an inactive listener commonly break the TCP socket.
JDBC URL typos such as a wrong service name or port also trigger the error immediately.
Long-running idle sessions may be terminated by NAT timeouts or load-balancer health checks, returning 17002 on the next read or write attempt.
Begin by pinging the database host and port to verify reachability. If unreachable, involve network or VPN teams.
Next, log in with SQL*Plus from the same client to isolate JDBC-specific issues.
Confirm that the Oracle listener is running with lsnrctl status
. Restart it if down. Validate the JDBC URL syntax: jdbc:oracle:thin:@//host:port/service
, and test alternate service aliases defined in tnsnames.ora
.
When cloud firewalls close idle TCP sessions, set oracle.net.CONNECT_TIMEOUT
=10000 and oracle.jdbc.ReadTimeout
=20000 to force retries.
For VPN drops, enable keep-alives on the client OS.
If the error appears only during high load, raise PROCESSES
and SESSION
parameters in the database and increase listener queue size via INBOUND_CONNECT_TIMEOUT
.
Automate health checks that alert when lsnrctl status
reports DOWN.
Use connection pools that validate connections with SELECT 1 FROM DUAL
before borrowing them.
Galaxy’s modern SQL editor surfaces connection errors instantly and stores validated connection strings centrally, reducing typo-related 17002 incidents across teams.
ORA-12541 "TNS: no listener" indicates the listener is entirely unreachable, while ORA-12514 "TNS: listener does not currently know of service" means the service name is invalid. Both are resolved by listener or service registration fixes, not network tuning.
.
No. It only indicates the JDBC client could not complete a network handshake. The listener or the network path may be at fault even if the database is running.
No. The error is network-level; memory adjustments will not resolve it unless the listener crashes due to resource exhaustion.
Galaxy validates and stores JDBC URLs, pings the database before query execution, and highlights connection issues instantly, reducing human errors.
Yes, but update firewall rules and JDBC URLs consistently across applications to prevent new 17002 incidents.