I have setup Sever, database and Firewall Setting (Rule) In windows Azure. I Have added The IP In firewall setting which is populating under the Windows Azure Firewall Tab.
When I am trying connect with Database using Manage from Azure Platform I am getting this error message.
Firewall check failed. Cannot open server 'XXXXXXXXX' requested by the login. Client with IP address 'XXXXXXXXX' is not allowed to access the server. To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.
And I am also Not able to connect via Sql Server Management Studio. Getting Same connection issue Error for My IP Address.
I am not using static IP but my IP haven't change during this process. I have tried lot Example but all are saying To add firewall rule That I had already done.
I have Added Firewall exception for port Number 1433.
But still this is not working Please let me know that what type of setting is still missing.
Thanks in advance.
If you want to manage SQL Azure from the Azure Portal you have to check the "Allow other Windows Azure Services to connect to this server". That is also required later for your Web/Worker roles deployed to Azure:
If you want to connect from your home/work PC, you have to keep the firewall up-to-date with your public IP address! Your public IP Address is in the little popup windows, which pops out when you want to add new firewall rule:
with new version of windows azure only go to firewall settings and click on add client IP and you will be okey. see picture bellow
As Azure keeps changing, so do the ways to get to the firewall.
Click your SQL server (not the database, but the server) -> click firewall -> add the IP range you want to allow.
Dont forget to click save!
This is simply the visual to what Saurin Vala said. For whatever reason in Azure you have to click Open in Visual Studio first.
If you find that you have to do this on a regular basis I would suggest installing the Windows Azure Powershell Cmdlets. Once you have those installed I've created an open source project on GitHub which provides a number of scripts of common tasks.
Changing Firewall rules just so happens to be one of those common tasks and the source can be found here: Windows Azure Powershell Extensions
In order to get these Extensions installed you can follow the instructions on my blog post SQL Azure Powershell for Developers on the Run!
In a future update I will be providing additional functionality to provide the publishsettings file instead of needing to create a CSV file of SubscriptionId and Thumbprint's for your Windows Azure Accounts.
Here is what I did to solve this issue. By going to Firewall Settings
DB->Overview->Firewall Settings
For me it was
Azure Portal (ARM)
Choose SQL databases sub folder on left or find in the more section to add.
Choose your SQL database
click firewall
inter in rule name and IP's
As you may already know, Microsoft changes things all around the place in the Azure Portal, it's good as it shows they care about the UX/UI, however it's a bit annoying for us to do things when we need.
So, currently to edit the firewall rules for a specific SQL database instance, you follow the below steps.
Home > [Your SQL database] > Overview > Set Server firewall
or
Home > All Resources > [Search for Your SQL database] > [Your SQL database] > Overview > Set Server firewall
The image below shows the UI flow.