views:

30

answers:

1

Hi, I'm using Hibernate to connect to an SQL Server 2008 named instance.

This works if I use the default instance name but not when using the "named" instance.

config.setProperty("hibernate.connection.url","jdbc:sqlserver://127.0.0.1\INSTANCE_NAME:1433;databaseName=DB_NAME;autoReconnect=true");

Any ideas why this happens?

Thanks in advance.

A: 

A named instance does not listen on port 1433, only the default instance

You should not need the :1433 bit

Default vs named instances is mentioned in the MS JDBC info on MSDN

gbn
Thanks that was the problem.
Marquinio