MS SQL connection with instance name

Questions and answers regarding general SQL and backend databases

MS SQL connection with instance name

Postby briese-it » Wed May 08, 2019 8:54 am

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?
Michael Harms
Briese Schiffahrts GmbH & Co.KG, Germany
- Servoy 2021.3.0.3642 Running on Windows 2019 DataCenter - MSSQL2017 & PostGreSQL
User avatar
briese-it
 
Posts: 155
Joined: Mon Jun 20, 2011 1:50 pm
Location: Leer, Germany

Re: MS SQL connection with instance name

Postby murmi » Wed May 08, 2019 9:29 am

Hi Michael
I would suggest

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

this works with us.
Fritz Maurhofer
Maurhofer Informatik AG
CH-8340 Hinwil
murmi
 
Posts: 32
Joined: Thu Jul 22, 2010 5:10 pm

Re: MS SQL connection with instance name

Postby briese-it » Wed May 08, 2019 9:40 am

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?
Michael Harms
Briese Schiffahrts GmbH & Co.KG, Germany
- Servoy 2021.3.0.3642 Running on Windows 2019 DataCenter - MSSQL2017 & PostGreSQL
User avatar
briese-it
 
Posts: 155
Joined: Mon Jun 20, 2011 1:50 pm
Location: Leer, Germany

Re: MS SQL connection with instance name

Postby murmi » Thu May 09, 2019 10:32 am

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)
Fritz Maurhofer
Maurhofer Informatik AG
CH-8340 Hinwil
murmi
 
Posts: 32
Joined: Thu Jul 22, 2010 5:10 pm

Re: MS SQL connection with instance name

Postby briese-it » Thu May 09, 2019 1:54 pm

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.
Michael Harms
Briese Schiffahrts GmbH & Co.KG, Germany
- Servoy 2021.3.0.3642 Running on Windows 2019 DataCenter - MSSQL2017 & PostGreSQL
User avatar
briese-it
 
Posts: 155
Joined: Mon Jun 20, 2011 1:50 pm
Location: Leer, Germany


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 4 guests