Error: "Connection failed: SQLState: '08001' occurs when creating an ODBC connection on Microsoft SQL Server Express

Cause

Microsoft SQL Express uses dynamic ports.  Confirm that the client workstation can telnet this port by using the port number in the ODBC connection.

The port used by SQL Express may be closed on the Firewall.

Resolution

The error message may be resolved as follows:

  1. Check the port number used by SQL Express.  In SQL Server Configuration Manager, expand SQL Server Network Configuration and click on the server instance you want to configure
  2.  In the right pane, double-click TCP/IP
  3. In the TCP/IP Properties dialog box, click the IP Addresses tab
  4. Configure your ODBC connection to use this port

 

 

Next,  go to the ODBC DSN configuration window and create or modify your DSN configuration

For the Server name, use the following [server]\[instance],[port number]

Example:

 

Solution Properties

Solution ID
222924450019752
Last Modified Date
Fri Jun 25 14:30:38 UTC 2021
Views
0