Yet another SQL Server enthusiast

2017-12-17

Connecting to Azure SQL Database #learning

Filed under: Uncategorized — sa @ 2:11 PM

Problem

If we want to connect to a Azure SQL Database by using a app (ex. SQL Server Management Studio) we may get following exception:

Azure.SQL.Database.01.Connection.Exception

Cause

According to message associated with this exception, the cause of this issue is related to configuration of server-level (see also sp_set_firewall_rule) or database-level (see also sp_set_database_firewall_rule) firewall rules used to allow the access to SQL DB.

Solutions

[1] First solution implies to configure the server-level/database-level firewall in order to allow connections from a specified IP of IP range: Select Azure SQL DB > Overview > Set server firewall

Azure.SQL.Database.02.Firewall.Configuration

Then Add client IP > Save:

 

Azure.SQL.Database.03.Firewall.Configuration.Client.IP

[2] Second solution is to allow connections to Azure SQL DB by activating Allow access to Azure services.

[3] If none of above solutions work for you then all details regarding FW configuration is available here: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-firewall-configure .

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: