Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

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?

share|improve this answer
    
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 '11 at 14:06
    
I just tried "localhost/SQLEXPRESS". It worked perfectly. Thanks for the answer. –  Evik James Nov 28 '11 at 14:18
add comment

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.

share|improve this answer
    
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 '11 at 22:12
add comment

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".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.