Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 SQL Server - 2005 - JDBC Connection error

Author  Topic 

PalPES
Starting Member

1 Post

Posted - 2011-05-06 : 13:37:38
Hi,

I am trying to run my application which attempts to connect to ms-sql server 2005 instance and i am getting the following error:


com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host DBSQL, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1033)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:593)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:57)


Can anyone please help in this issue?

Have enabled tcp/ip through configuration manager of ms-sql, port is set for ip-all to 1433.. firewall was also off, "sa" user id has permission to connect to my DB..

When i check using netstat for port 1433, it does not show up sql service as running.. Although registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\[InstanceName]\MSSQLServer\SuperSocketNetLib\Tcp\TcpPort
is also set to 1433..

Can anyone please help in this regard?
   

- Advertisement -