Udostępnij za pośrednictwem


Solving connection issue to SQL Azure from Management Console on Local Machine for beginners

SQL on the Cloud had already facinated me. I was excited to own an account for SQL Azure. Initially I played arrond with is understanding all the settings that I could configure so that an application has no issues to get connected. Configuring FireWall on the Azure portal is the most important and critcal part. This can be done by following the below steps

1. Log on to https://sql.azure.com

2. Click on your project

3. Click on the tab "Firewall Settings"

4. Click on Add Rule. It will show your current IP address on the pop up box. Add the range so that any connection from that IP address is allowed.

5. Once this is done open your SQL Management console and add the full server name.

6. Enter your SQL user name password as configured by you on the portal.

After all these steps, I was confident that a connetion will go through. Unfortunately it did not work as expected. I found an url that had further trouble shooting tips that can be found at https://blogs.msdn.com/b/sqlazure/archive/2010/03/22/9982979.aspx 

All these steps passed expect for ping request that was still missing some packets. I tried connecting with SQLCMD which was a success as well.

Syntax for SQLCMD is as below

 sqlcmd -S <SERVER NAME.Domain.com> -d master -U " <UserName>@<ServerName>" -P <PUTYOURPASSWORDHERE> -q "select 1"

 Even after these trouble shooting I was still not able to get connected. I saw that I am running ISA Client  a firewall client on top of windows firewall. I reverted all the settings to its default on the windows firewal on my local machine and reinstalled ISA Client. It had some issues connecting to the proxy which was stopping me to get connected.

This worked like a piece of cake. I got access to SQL Azure from my local machine.

I am hoping this will help many of you to save time and look for areas that will help in resolve issues by looking into area which might get neglected.