Easysoft ODBC-SQL Server Driver

Why do I get error "Client unable to establish connection: OS Error: 'Connection refused'"?

Last Reviewed:
24th January 2024

Check that the SQL Server instance that you are trying to connect to is running.

On the SQL Server machine, "SQL Server (instance)" will be listed in the output of the net start command, if the SQL Server instance is running.

If SQL Server is listening on a fixed TCP port, check that you can use telnet to connect to the port that you have specified in the data source:

telnet hostname port

where hostname is the host name or IP address of the machine where SQL Server is running and port is the port number that you have specified with the Port attribute. If the SQL Server instance is listening on this port, you will see output similar to:

Connected to myserver

Escape character is '^]'

To exit from telnet, type CTRL-] and then quit.

If you do not see this output or a "Connection refused" error displays, SQL Server is not listening on the specified port. Contact your database administrator for the correct SQL Server port.

If you are using the correct port but are unable to connect with telnet, the SQL Server instance may not allow remote TCP/IP connections. See Why do I get error "Client unable to establish connection: Server not configured for TCP connection"?

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)