Issue

A "Connection verification failed for data source" error may occur while attempting to verify a SQL Server data source that connects to SQL Server Express using the default ColdFusion SQL Server JDBC driver.

The full error is as follows:

Connection verification failed for data source: {data source name} java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect The root cause was that: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver] Error establishing socket. Connection refused: connect

Reason

The TCP/IP and Named Pipes protocols are disabled by default upon the installation of SQL Server Express.

The default TCP/IP port that SQL Server Express listens on may not be 1433.

Solution

To configure a data source for SQL Server Express using the default SQL Server driver, follow these steps:

  1. Launch the SQL Server Configuration Manager.
  2. Expand "Server Network Configuration".
  3. Expand Protocols for "SQLEXPRESS".
  4. Enable Named Pipes.
  5. Enable TCP.
  6. Select TCP/IP in the right pane.
  7. Select Properties > IP Addresses.
  8. Make "Enabled" for all applicable IPs = "Yes".
  9. Note the TCP port value or add if one does not exist for all applicable IPs.
  10. Restart SQL Express.
  11. Configure a SQL Server JDBC data source in the ColdFusion Administrator to listen on the port number from step 9 above.
  12. Complete the data source configuration connectivity and authentication information.
  13. Saving the data source should verify without error

Additional Information

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy