Problem connection when instance is defined.

FJorge's profile image FJorge posted 2 years ago in HeidiSQL portable Permalink

Hi! I'm sorry if this as been already asked. I've searched and found some similar, but none seems to be exactly my question.

I use HeidiSQL (the portable version) at some time now, but when I connect to a server and instance name (ServerIP\InstanceName), I can't get in. (when in other servers I don't need to define the instance name I don't have this problem)

With the 12.0.0.6512 version I get:

SQL Error (18456): Cannot open database "DBaseName" requested by the login. The login failed
Login failed for user 'sa'.

In the drop-down arrow (on the Database name) I see some databases (master, model, msdb...) but not the one I'm looking for.

We could say it's the database configuration, but if I use an older version (10.2.0.5623) I have no problem at all defining ServerName plus InstanceName. I keep these older version just to access these databases.

Do you have any idea what is happening here? Thanks for the help and HeidiSQL is really a great piece of software. :)

FJorge's profile image FJorge posted 9 months ago Permalink

Sorry to bother again.

I still have the problem, I always update the HeidiSQL client wishing this problem goes away, but, for this situation, I need to keep coming back for the older version HeidiSQL (version 10.2.0.5623). So... I use the latest version to connect to most of the servers, and some of them (when defining IP\InstanceName) I need to use the old version.

What kind of information from my side would be useful to sort this out?

Thanks!! :)

ansgar's profile image ansgar posted 9 months ago Permalink

I think this is related to the used driver, so you could try out the both "SQLOLEDB" and "MSOLEDB" in the library dropdown of the session configuration.

I am just comparing the code in TAdoDBConnection.SetActive from commit:2a91a13b429735071d7d57d82a149d333375ae43 from July 8th 2019 (which is in build 5623 you mentioned) with the latest sources. There are only few things affecting the connection to MSSQL, most interesting one is the new parameter for the connection string: DataTypeCompatibility=80; - but this is just for MSOLEDBSQL compatibility with new column types.

Apart from that, the underlying ADO library in Delphi may have changed, but that's beyond my knowledge.

FJorge's profile image FJorge posted 9 months ago Permalink

Hi there Ansgar,

Thanks for your reply.

I tried with both drivers ("SQLOLEDB" and "MSOLEDB"), as you proposed, but I was not able to get a different result. I'll put the images here:

MSOLEDB

(first attachment)

SQLOLEDB

(second attachment)

By the way, just to illustrate, using the older version, I get this:

HeidiSQL 10.2.0.5623

(third attachment)

I think this is a small issue, since I have the older version of HeidiSQL and I am able to connect to these kind of DBs, but it would be pleasant to use just the latest version.

Thanks for your attention. :)

3 attachment(s):
  • HeidiSQL-12.5.0.6680-MSOLEDBSQL
  • HeidiSQL-12.5.0.6680-SQLOLEDB
  • HeidiSQL-10.2.0.5623

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