Side-by-side comparison of 08001 and 08006 — understand the differences, causes, and fixes.
The client could not establish a connection to the database server.
The database server is not running, the hostname or port is incorrect, or a firewall is blocking the connection.
Verify the server is running and accepting connections. Check the hostname, port, and connection string. Test network connectivity and firewall rules.
An established database connection was unexpectedly lost.
The server crashed, was restarted, or the network connection was interrupted. Server-side idle timeout may have closed the connection.
Implement automatic reconnection logic. Configure connection pool validation. Check server logs for the disconnect cause.