Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to SQL Azure remotely from SSMS 2012

Tags:

sql

ssms

azure

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.

like image 927
Alex Avatar asked Oct 07 '22 15:10

Alex


People also ask

Can't connect to Azure SQL Database from SSMS?

SSMS cannot connect to azure sql databaseYour client IP address does not have access to the server azure. Sign in to an Azure account and create a new firewall rule to enable access. This is for obvious security reasons. You don't want to allow everyone to be able to connect to your sql database in azure.

Can't connect to SQL Server on Azure?

Steps to resolve persistent connectivity issuesSet up firewall rules to allow the client IP address. On all firewalls between the client and the Internet, make sure that port 1433 is open for outbound connections. Review Configure the Windows Firewall to Allow SQL Server Access for additional pointers.

Can you connect SSMS to Azure SQL Database?

Get started using SQL Server Management Studio (SSMS) to connect to your Azure SQL Database and run some Transact-SQL (T-SQL) commands. The article demonstrates how to follow the below steps: Connect to an Azure SQL database. Create a database.


1 Answers

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.

like image 191
AvkashChauhan Avatar answered Oct 11 '22 05:10

AvkashChauhan