Wednesday 2 November 2016

Azure SQL Database Firewall Issue (Connectivity Issue)

Hey everyone! Yes, I'm still around and yes, this is still SQL Something!

I'm sounding like a broken record now but, as usual, life has been pretty busy. Definitely going to try to finish the year right however, by having at least one post for each of the last couple of months.

Now! Let's get on with it.

Today we are looking at connecting to a Azure SQL Database. In a nutshell, an Azure SQL Database is a DB that exists on a logical DB server, not an actual DB Server VM. It takes away the hassle of having to do server related admin tasks and allows you to focus on the DB itself and the data it contains.

For the purpose of this exercise, let's assume we created a Azure SQL DB and when we attempted to connect to it via Management Studio, we received the following:
Fig. 1: Danger Will Robinson!


Now, we can take the following steps:
  • Ensure that you are using the correct server name, username and password.
If the above doesn't work, we will have to verify our Azure SQL Database Firewall rules.
  • Log on to portal.azure.com with your valid user.
  • Navigate to your azure SQL Databases.
  • Click the database in question.
  • Select 'Set Server Firewall'.

Fig. 2: Firewall awesomeness.

  • Click add Client IP.

Fig. 3: Add yo IP
  • Click 'Save'.

Now we can retry our connection.

And that's all there is to it. :-)

DISCLAIMER: As stated, I’m not an expert so please, PLEASE feel free to politely correct or comment as you see fit. Your feedback is always welcomed. :-)