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.

No successful connection to microsoft sql after upgrade to 10.2

hakiru's profile image hakiru posted 12 months ago in Creating a connection Permalink

When I use 10.1 everything works correctly.

Of course I use the same credentials, it's TCP/IP connection. On 10.2 receive the error: SQL Error (17): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

I noticed that in 10.2 I have new option "Library" and I can't change it when I use MSQL connection - libmariadb.dll is chosen and select box is disabled.

ansgar's profile image ansgar posted 12 months ago Permalink

The library dropdown is just for MySQL connections. On MSSQL it does nothing.

Perhaps you need the updated OLE DB driver?

buttm2's profile image buttm2 posted 11 months ago Permalink

The library dropdown is just for MySQL connections. On MSSQL it does nothing.

Perhaps you need the updated

Hi, i am having the same issue. I have MSOLEDBSQL selected in the Library dropdown. The connection fails and i get the following error: SQL Error (0): TCP Provider: No connection could be made because the target machine actively refused it Login timeout expired. Thanks

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 11 months ago Permalink

https://blogs.msdn.microsoft.com/sql_protocols/2007/07/19/tcp-provider-no-connection-could-be-made-because-the-target-machine-actively-refused-it/

buttm2's profile image buttm2 posted 10 months ago Permalink

Thanks ansgar, I think this problem exists in the nightly builds. I am using ver. 10.2 and the connections work fine in it but as soon as i update to the nightly build, the same connection stops working. Hope this helps.

ansgar's profile image ansgar posted 10 months ago Permalink

Does it then work with SQLOLEDB library?

buttm2's profile image buttm2 posted 10 months ago Permalink

Does it then work with SQLOLEDB library?

No. It does not work with both SQLOLEDB and MSOLEDBSQL.

jonttu's profile image jonttu posted 3 weeks ago Permalink

Hey Ansgar,

sorry for necrobumping this thread, but this problem seems to have suffered a regression in Version 11.x

In Version 11, connecting via TCP/IP to an MSSQL instance of 10.0.0.1\INSTANCENAME fails with a timeout using both SQLOLEDB and MSOLEDBSQL libraries. MSSQL servers without instances work as intended.

Reverting to Version 10.1, everything works perfectly - instances or none.

Thanks for all your hard work and let me know if I can supply more information to help troubleshooting this issue.

ansgar's profile image ansgar posted 3 weeks ago Permalink

Other users reported they used a wrong port number. Could that be the case for as well?

jonttu's profile image jonttu posted 3 weeks ago Permalink

Hey Ansgar,

(wow you're fast)

sadly, no. Port 1433, on both clients, identical settings and connection credentials, etc. Also can connect flawlessly to the server in question using Microsoft's SSMS.

It's not a huge issue for me personally, as I just keep a portable copy of Version 10.1 around to connect to instanced SQL Servers, and 11.0.0.5919 for everything else. But other people might hit a snag on this, so I thought I'd let you know!

Thanks for your support and please don't hesitate to ask for more information if you need it.

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 3 weeks ago Permalink

You say that servers "without instances" work as intended. And one other user reported that he also ran an Analysis Service on that server, on the port 1433 if I remember right. After he changed the port to the one from the instance, HeidiSQL connected normally. I have a gutt feeling that this issue is similar.

ansgar's profile image ansgar posted 3 weeks ago Permalink

See this thread. I'm not sure what port he finally used.

jonttu's profile image jonttu posted 3 weeks ago Permalink

Hi Ansgar,

sorry for the delay in getting back to you on this.

So I went and ran 10.1 to connect to the SQL instances that didn't work in 11.x. I hit up netstat -b in a cmd window with Admin rights and sussed out which port heidisql 10.1 was using to connect (you can't change ports in 10.1 manually, as it does the autodiscovery thing - which makes it work I guess).

So I found out it seems to (always?) resort to 65442. I mention this, because it may be pertinent to the next poor soul hitting a snag on this issue.

As soon as I keyed in port 65442 to 11.x, it connected like a charm. So, in lieu of autodiscovery, you can always use the above method to find the right port and aren't in any position to look into the sql server directly (because you don't have those privileges).

Hope that helps the next guy, and thanks for the hint!

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.