Sami
Sami

Reputation: 341

How to create a new firewall rule to enable access to the server?

I am having an issue connecting to the server. I had the full access to the data yesterday, but suddenly the day after today, the system requires me to add a new firewall rule to enable access to the data.

Here it ask me to sign up to Microsoft Azure so I did sign in:

Here it ask me to sign up to Microsoft Azure

as I put my email where I subscribed to Microsoft Azure, it showed me that The server specified doesn't exist in any subscription:

The server specified doesn't exist in any subscription

I need help on how to enable the firewall, and have access to the server from my account, so I can keep working on the data.

Upvotes: 1

Views: 7250

Answers (2)

Sean Holm
Sean Holm

Reputation: 329

You are seeing that message because your client/local IP address has not yet been added to the firewall rules on the SQL server.

To regain access to your SQL server from your local machine:

  • use your web browser and login to the Azure portal
  • locate your SQL server: All services -> Databases -> SQL Servers
  • click on the name of your SQL server to open its properties page
  • click on Firewalls and virtual networks (located under Settings)
  • your current IP address should already be detected and viewable on the page, so go ahead and click the + Add client IP button
  • you can give the firewall rule a friendly name (it will default to "ClientIP_X_X_X_X")
  • click the Save button and you're done.

Your client IP address is likely to change every few days by your Internet provider unless you are on a plan that gives you a static IP address.

Upvotes: 5

M.Ali
M.Ali

Reputation: 69584

You are having this problem because your Client Machine's IP does not have access to the Azure database. Like you have mentioned that you did have access till yesterday but today you cannot access it. It is probably your client machine has its IP set to dynamic and it changed its IP today.

To fix you will need to logon to your Azure Portal.

  1. Go to the Azure SQL Database on your Azure Portal.

  2. In the Details (3rd blade) click on Set Server Firewall

enter image description here

  1. At this point a new window will open and on the very first blade for Firewall settings click on Add client IP.

enter image description here

  1. Click on the Save button and close it.

  2. At this point your Client PC's IP would have been added to the Azure Firewall as a rule and you should be able to connect to Azure SQL Database from your Client Machine.

Upvotes: 1

Related Questions