Forum Discussion

Gwen_Kreager's avatar
Gwen_Kreager
New Contributor
15 years ago

Problem connecting to SQL Server Instance

Hi,

We have several instances of SQL server running on a server and I'm having trouble in SoapUI Pro connecting to any instance of the server but the initial one.

Example:

On our server, we have the following instances of SQL Server installed:

testServer (instance one)
testServer\Red (instance two)
testServer\Blue (instance three)

In SoapUI pro, I can use the following connection string to successfully conect to the first instance above:

jdbc:sqlserver://testServer:1433;databaseName=DatabaseName;integratedSecurity=true;

However, I can't seem to create a connection string which will let me connect to the other two instances. Here are the connection strings I've tried:

jdbc:sqlserver://testServer\Red:1433;databaseName=DatabaseName;integratedSecurity=true;
jdbc:sqlserver://testServer\\Red:1433;databaseName=DatabaseName;integratedSecurity=true;

Any idea what the correct connection string one would use to connect to a named SQL Server instance like the ones I've outlined above? Any help would be greatly appreciated.

1 Reply

  • Probably not great form replying to your own post, but just in case this helps someone else.

    I found that I need to specify the port number used by the instance in the connection string instead of the instance name.

    So, in my previous examples, the following:

    jdbc:sqlserver://testServer\Red:1433;databaseName=DatabaseName;integratedSecurity=true;

    works when the instance name is removed and the port address is changed.

    jdbc:sqlserver://testServer:1083;databaseName=DatabaseName;integratedSecurity=true;

    I still hope there is a way to make this work with the named instance instead of the change of the port address since ports may be different on different servers.