# MS SQL connection with instance name

**URL:** <https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972>\
**Category:** Classic Servoy\
**Created:** [May 8, 2019, 6:54am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972 "2019-05-08T06:54:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![briese-it](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@briese-it](https://forum.servoy.com/u/briese-it)\
**Post date:** [May 8, 2019, 6:54am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972/1 "2019-05-08T06:54:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![murmi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/murmi/32/4446_2.png) [@murmi](https://forum.servoy.com/u/murmi)\
**Post date:** [May 8, 2019, 7:29am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972/2 "2019-05-08T07:29:30Z")

</div>

Hi Michael  
I would suggest

jdbc:sqlserver://ServerIP:1433;DatabaseName=SQL\_Database;SelectMethod=cursor;instanceName=MSSQL\_SERVOY\_Instance

this works with us.

---

<div class="post-metadata">

**Author:** ![briese-it](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@briese-it](https://forum.servoy.com/u/briese-it)\
**Post date:** [May 8, 2019, 7:40am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972/3 "2019-05-08T07:40:08Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![murmi](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/murmi/32/4446_2.png) [@murmi](https://forum.servoy.com/u/murmi)\
**Post date:** [May 9, 2019, 8:32am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972/4 "2019-05-09T08:32:56Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![briese-it](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@briese-it](https://forum.servoy.com/u/briese-it)\
**Post date:** [May 9, 2019, 11:54am UTC](https://forum.servoy.com/t/ms-sql-connection-with-instance-name/19972/5 "2019-05-09T11:54:22Z")

</div>

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.
