I got a new Windows 10 machine and installed the latest version of SQLEXPRESS and then the latest version of SSMS (17.9.1).
When trying to connect to my Azure database, I'm getting the following error.
Error connecting to 'mydb.database.windows.net'.
------------------------------ ADDITIONAL INFORMATION:
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (Microsoft SQL Server, Error: 10054)
An existing connection was forcibly closed by the remote host
What I've tried so far:
- Uninstall/Reinstall - nope. I did this twice
- Turn off firewall - didn't work. Besides, I can connect to the database fine through Visual Studio 2017, so it isn't a firewall issue. I also validated with netstat that port was open after I telnet-ed to the server.
- Different version - I tried downgrading to SSMS version 17.9, but I get the same error. I'm in the process of bringing up 18.0 (preview 5) just to see if something will work for me. I may update here whether that works for me or not.
- Different database - I have two Azure servers, I can't access either. I can connect to my local SQLEXPRESS instance without any issues.
My Google-foo has failed me on this so far. What am I missing? My current theory is that the SQLEXPRESS installation is colliding with SSMS install, but I don't know how to know that for sure - it was just something I read that used to be a problem.
Update
18 Preview 5 didn't help me. Same error :(
Others that appear to have this same issue without a resolution:
https://www.reddit.com/r/SQLServer/comments/9vfos7/issue_with_ssms_cant_connect_to_specific_server/
https://stackoverflow.com/questions/52885575/ssms-connect-to-azure-failure
Update 2
Uninstalling SQLEXPRESS and using IISCrypto to add specific TLS entries into the registry didn't help either.
Update 3 (After the answer below)
I installed SSDT and everything broke again :(. However, I did find that I can connect a single query in SSMS with no problem, but I cannot connect to a Server in the Object Explorer. Go figure.
I'll update here if there is something else I discover.