GOPAL SHARMA
GOPAL SHARMA

Reputation: 687

How to access Azure SQL Data without setting IP Address in firewall setting? Just By Simply ConnectionString?

I have my SQL database on Azure devOpos.
To access this, I have set my IP Address in Firewall setting but IP changes daily or twice a day, So I have to set again and again.

Else, I get this error.

Cannot open server 'abcdb-dev' requested by the login. Client with IP address '106.215.195.185' 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.

So, how to overcome this problem ? how can I access my database just by connection string without setting any firewall settings of IP.

Upvotes: 3

Views: 2512

Answers (1)

Utkarsh Pal
Utkarsh Pal

Reputation: 4552

As per Azure SQL Database IP firewall rules -

Dynamic IP address:

If you have an internet connection that uses dynamic IP addressing and you have trouble getting through the firewall, try one of the following solutions:

  • Ask your internet service provider for the IP address range that's assigned to your client computers that access the server. Add that IP address range as an IP firewall rule.
  • Get static IP addressing instead for your client computers. Add the IP addresses as IP firewall rules.

Connection string is an alternative of username and password. You still need to whitelist the IP address to access the database.

You can also refer the answer on this similar requirement in another SO thread: Reach Azure SQL database with dynamic IP addresses

Upvotes: 1

Related Questions