3

I just installed SQL Server 2008 R2 and ColdFusion 9.0.1 on my Windows 7 machine for development use only.

I have ColdFusion running well and serving pages (that aren't connected to a database). I can view my databases in SQL Server Management Studio.

I successfully restored a few small databases and now I am trying to set up datasources for them through the ColdFusion Administrator. On my other machine, this was super easy. Not so much this time.

The database I just added is named "Test".

I am getting this error:

Connection verification failed for data source: Test java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: localhost:1433. Reason: Connection refused: connect The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: localhost:1433. Reason: Connection refused: connect

It looks like the connection between ColdFusion and SQL Server is being refused. I know, brilliant observation, right?

On my other machine, I was able to create datasources with just the default settings, no server name, username, or password.

Any clue as to what might be the cause and how I might fix it?

3 Answers 3

4

When you installed the SQL server, use should select "default" instance, if there was another SQL Server installation previously detected it will default to the SQLExpress. Instancing is what allows you to run and access multiple SQL Servers on a single machine.

Are you sure localhost/SQLEXPRESS doesn't work?

3
  • I didn't try "localhost/SQLEXPRESS". I quite trying after I got "monster\SQLEXPRESS" working. Monster is the name of the server, my localhost.
    – Evik James
    Nov 15, 2011 at 14:06
  • I just tried "localhost/SQLEXPRESS". It worked perfectly. Thanks for the answer.
    – Evik James
    Nov 28, 2011 at 14:18
  • Also make sure that TCP/IP is enabled overall via SQL Server Configuration Manager as explained here: tensixconsulting.com/2012/02/… Sep 17, 2017 at 18:32
2

Are you able to setup a standard DSN using odbcad32.exe? If not, that would indicate an issue external to ColdFusion.

Probably obvious, but in SQL Configuration Manager > SQL Server Network Configuration > , I would ensure that TCP/IP is Enabled, and that the "TCP Port" is set to 1433 (probably set the "TCP Dynamic Ports" to blank). Also note that there are several entries there, one for localhost, which is what you are using to connect.

1
  • I had to enable TCP/IP a few days ago. Yes, it's enabled now. I was able to get it working. Thanks for your help though!
    – Evik James
    Nov 13, 2011 at 22:12
0

ANSWER: For some reason, using localhost or leaving blank the server name in the new datasources doesn't work. I actually had to enter "monster\SQLEXPRESS".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .