Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Connecting to different Databases on one Server

hausmeistah's profile image hausmeistah posted 2 months ago in Creating a connection Permalink

Hi There

First of all: Tanks for that great program - I stumbled upon it by searching for an alternative to sqldeveloper but for MS SQL.

Now I have one problem: we do have two different versions of MS SQL server on one physical machine. I can easily connect to one of them, but when I want to connect to the other I do not know how to configure the connection.

I can connect via Micosoft SQL Server Management Studio by entering the following into the field for server name:

sw2k12mssqlprod\mssqlserver12

but if I use that string in HeidiSQL I get the error message that the database could not be found.

How can I change the settings to use HeidiSQL in that situation?

Any help is much appreciated

Kind regards

Tomas

TomCoIIins's profile image TomCoIIins posted 2 months ago Permalink

Or in other words: What do one have to put into the login-screen from HeidiSQL when the resulting connection string should look like "data source=MyServer/MyDatabase;..." instead of "data source=MyServer;..." The last one works for a single SqlServer-installation on a machine "MyServer". But on a side-by-side installation one has to do it like the first example.

Regards Tom

ansgar's profile image ansgar posted 2 months ago Permalink

The value for "Data Source=x" in the connection string is taken 1:1 from what the user entered in the Host/IP field. There is no conversion done, for none of the both providers SQLOLEDB and MSOLEDBSQL.

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 2 months ago Permalink

Ah, if you specified a port on a TCP/IP connection, that port is appended to the datasource, separated from the host by a comma: Data Source=xyz,123;

TomCoIIins's profile image TomCoIIins posted 2 months ago Permalink

Thanks. When deleting the portnumber (or set to 0) it works. Thank you very much!

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.