Sql Server 2005 Express Edition

Hi all,

I’ve installed the free MS SQL Server 2005 express edition and can connect to it via their SQL Server Management Studio Express. However when trying to connect via JDBC I get the following error:

An error Occured while establishing the connection.
Type: com.microsoft.sqlserver.jdbc.SQLServerException Error Code 0 SQL State: 08S01

Message:
The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

I’ve tried both the latest Microsoft drivers and the JTDS drivers. FYI I have been successfully able to connect to a client’s SQL Server database, so I’m beginning to think it is a configuration or setting on the MS SQL Server Express Edition side.

Has anyone run into this one?

Thanks,

Rich Coulombre

I think by default it doesn’t listen on TCP/IP. Check in the admin section if it does more than the classic ‘Named Pipes’

I came accross the same issue!
you have to set also the bottom tcpip to 1433

and use this string:

jdbc:jtds:sqlserver://localhost:1433/servoy_repository