Page 1 of 1

MS SQL connection with instance name

PostPosted: Wed May 08, 2019 8:54 am
by briese-it
Normally we are using connections to MS SQL databases without instance names. This is running fine since years.
Now I have to connect to a server with an instance but I can not get a connection. We are using mssql-jdbc-7.2.1.
I think the connection string should be: jdbc:sqlserver://ServerIP\MSSQL_SERVOY_Instance:1433;DatabaseName=SQL_Database;SelectMethod=direct

Has somebody a connection to a MS SQL database running fine with instance name?

Re: MS SQL connection with instance name

PostPosted: Wed May 08, 2019 9:29 am
by murmi
Hi Michael
I would suggest

jdbc:sqlserver://ServerIP:1433;DatabaseName=SQL_Database;SelectMethod=cursor;instanceName=MSSQL_SERVOY_Instance

this works with us.

Re: MS SQL connection with instance name

PostPosted: Wed May 08, 2019 9:40 am
by briese-it
Hi Fritz,
thanks for your quick reply.
that does not work eighter. On the SQL Server I can see a failed incoming connection to the standard database and no connection attempt to the instance. Maybe the problem is a standard installation and an instance on one server?
Which SQL Server Version are you working with?

Re: MS SQL connection with instance name

PostPosted: Thu May 09, 2019 10:32 am
by murmi
Hi Michael

>Which SQL Server Version are you working with

The example was with a 2008R2 but should work with any Version.

>On the SQL Server I can see a failed incoming connection to the standard database and no connection attempt to the instance

Are you sure, that the instance listen to port 1433? (ServerIP:1433)

Re: MS SQL connection with instance name

PostPosted: Thu May 09, 2019 1:54 pm
by briese-it
That`s it. There was no port configured on the instance. The connection with Management Studio was working fine without adding a port but Servoy connection runs only with specifying a port within the SQL Connection Manager.
Many thanks.