Azure: Error while connecting to Azure SQL Server “Cannot open server ‘…’ requested by the login. Client with IP address ‘…’ is not allowed to access the server”

Recently, while accessing azure SQL server from SQL Server Management Studio, we got the below error:

 “Cannot open server ‘server_name’ requested by the login. Client with IP address ‘xxx.xxx.xxx.xxx’ is not allowed to access the server”.

bbaa

To fix this issue, in Azure portal, we added the IP address of machine from which we were trying to access the SQL Server. Below are the steps to fix:

  • Go to Azure portal –> All Resources –> Click on Azure SQL Server that we are trying to access.

ee

  • In the details view, select Firewalls and virtual networks.

ff

  • Click on Add Client IP and then click on Save. The IP address of the machine will be added to the list of IPs from which we can access the Azure SQL Server.

cc

After performing the above steps, we were able to connect to the Azure SQL Server from SQL Server Management Studio.

dd

NOTE: After adding the IP address, it might take up to 5 minutes for the change to take effect.

Hope it helps !!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s