5
votes

I am unable to connect to my SQL Azure database instance remotely using SQL Management Studio 2012. Firewall exception is in there for my local IP. I can connect successfully and admin the database using the browser based management link in my Azure account.

I just can't seem to connect to the database via SSMS or anything else like VS2012.

Here is the format I'm for my connection in SSMS:

Server Name:     myservername.database.windows.net
Authentication:  SQL Server Authentication
Login:           myusername@myservername
Password:        my-password
Connect to:      (i've tried) "master", mydatabasename, <default>
Encryption:      TRUE

Once again, I DO have the firewall rule active for my local IP address on the server instance of my Azure account.

When I attempt to connect, I receive this error:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - the wait operation timed out.) (Microsoft SQL Server, Error: 258)

When searching for that 258 error, I do not get many results related to SQL Azure. I appreciate any help.

1
Is the TrustServerCertificate property set to true in your SSMS connection?Leslie Davies
I do not believe this is an option in SSMS.Alex
You can add the TrustServerCertificate via "Additional Connection Parameters" in SSMS. msdn.microsoft.com/en-us/library/cc645898.aspxLeslie Davies
Added "TrustServerCertificate=true" and still luck on the connection. Same error as before, which makes me think its something else.Alex

1 Answers

4
votes

Error 258 is generated due to some of the configuration within your machine if a secure network could be established between two endpoints and if one machine initiate secure channel. This problem could be very much machine specific and not SQL specific that why you did not find any resources on this regard.

Can you try using SQLCMD as described in the following troubleshooting guide and see if that works to isolate SSMS specific issues on the same machine: http://social.technet.microsoft.com/wiki/contents/articles/1719.windows-azure-sql-database-connectivity-troubleshooting-guide.aspx

IF you capture and analyze network packets traffic you might be able to determine the root cause of connectivity error.