0
votes

I am trying to connect to a DB.

enter image description here

But I get an error:

Connection verification failed for data source: dwh_trgt_care

java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: pasdwdb01:3003. Reason: Connection refused: connect

The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: pasdwdb01:3003. Reason: Connection refused: connect

I can't figure out why it thinks it should be connecting to 3003

Addendum

This is the first time I have connected to and SQL Server 2008 R2

1
The double name in the Server field looks suspicious. Have you successfully created dsns to that server before? - Dan Bracuk
I have connected this server with SSMS and I have connected to other servers with back slashes before - James A Mohler
Do you happen to be using ColdFusion's sandbox security on this server? And I am assuming that the name in the server field is referring to a SQL instance running on your SQL server. - Miguel-F
Not using SandBox security. the `` is an instance. - James A Mohler
I had to ask because there is a bug with ColdFusion 9 and connecting to database instances. ColdFusion 9.0.1 - Bug 3042666. You could have a configuration issue. When connecting to a SQL instance that server is actually running under a different port than 1433. When you connect as you are, named instance on port 1433, the SQL server will actually negotiate communications on another port. I'm guessing that is what is happening here and perhaps your ColdFusion server cannot connect on the other port. Firewall perhaps? - Miguel-F

1 Answers

1
votes

When using a SQL named instance, SQL server will negotiate communications over a dynamically assigned port by default. It can also be configured to use a specified port however.

See this related question/answer - port number of SQL Server

Also this - Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)

If enabled, the default instance of the SQL Server Database Engine listens on TCP port 1433. Named instances of the Database Engine and SQL Server Compact are configured for dynamic ports. This means they select an available port when the SQL Server service is started.

If you do need to open up a port on your firewall then you might want to assign a specific port instead of opening up a range of ports.