Error Message: Connection failed

N1loon's profile image N1loon posted 5 months ago in General Permalink

Hi all!

First, I want to say that I use HeidiSQL for a longer while now for practicing SQL and it's by far my favorite IDE! Big thanks to the developers :-)

Now, I encountered an error when trying to connect to my local SQL Server installation (OS: Windows 11): image.png

As showcased in the screenshot, I recently upgraded to the latest OLE DB driver version (v.19). Since then, I get a pop-up window telling me that "the certificate chain was issued by an authority that is not trusted".

Interestingly, it works fine with OLE DB v.18; I can successfully connect to the database server when only this driver is installed on my computer (it's just shown then as 'MSOLEDBSQL' in the library tab).

I did some research myself and came across the GitHub issue 2066. While it does not fully relate to my problem, I tried the proposed registry hack in order to obtain a list of all providers. None work except for 'SQLOLEDB' which - as far as I understood - is an outdated/less-secure driver: image.png

Also, in SSMS I'd have the option to put a check mark for 'Trust server connection' when defining the connection parameters, but I can't find/set it here ...

Thanks in advance for any help!

wherrelz's profile image wherrelz posted 5 months ago Permalink

Hi the solution for this is to install MS OLE DB v18.7.5, and restart heidisql. The "library" dropdown will then have the option "MSOLEDBSQL" without the "19" suffix

The download links can be found on microsoft's learn.microsoft.com site, just ensure the version number is 18.x.x and not 19.x.x

Hope this helps

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