Unable to set up a Data Connection to an Azure Database

Unable to set up a Data Connection to an Azure Database

book

Article ID: KB0077371

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.5 and Higher

Description

When connecting to an Azure Database, it errors out stating that the client with IP address 'X.X.X.X' is not allowed to access the server. Following is the stack trace observed in the Analyst client logs when captured in DEBUG mode.
 
2016-02-10T15:56:27,172+01:00 2016-02-10 14:56:27,172 kaha [31] DEBUG Spotfire.Dxp.Data.Adapters.SqlServer.SqlServerAdapterConnection [(null)] - Failed to connect.
System.Data.SqlClient.SqlException (0x80131904): Cannot open server 'ulrika' requested by the login. Client with IP address 'X.X.X.X' is not allowed to access the server.  To enable access, use the Windows Azure Management 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.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)


 

Issue/Introduction

Unable to set up a Data Connection to an Azure Database

Environment

All Supported Operating Systems

Resolution

 - Make sure you have configured the IP Firewall of the Azure database server to accept the client's IP address.
 - Make sure that client's firewalls are open for it to connect to Azure Database. A good test is to telnet the Azure Database hostname on port 1433.

Additional Information

https://stackoverflow.com/questions/34760223/client-with-ip-address-is-not-allowed-to-access-the-server-azure-sql-database