
If the address isn't within a range that's in any of the database-level or server-level IP firewall rules, the connection request fails.Server-level IP firewall rules apply to all databases managed by the server. If the address is within a range that's in the server-level IP firewall rules, the connection is granted. If the address isn't within a range in the database-level IP firewall rules, the firewall checks the server-level IP firewall rules.If the address is within a range that's specified in the database-level IP firewall rules, the connection is granted to the database that contains the rule.When a computer tries to connect to your server from the internet, the firewall first checks the originating IP address of the request against the database-level IP firewall rules for the database that the connection requests. Other users, such as users of a database application, might need database-level IP firewall rules. Some users, such as administrators, might need server-level IP firewall rules. And even if you use server-level IP firewall rules, you might need to audit database-level IP firewall rules to see if users with CONTROL permission on the database create database-level IP firewall rules.Ĭan I use a mix of server-level and database-level IP firewall rules? Server-level IP firewall rules might be easier to configure, but scripting can configure rules at the database-level. In this scenario, best practices are determined by your needs and environment. You need at least CONTROL DATABASE permission at the database level to configure database-level IP firewall rules through Transact-SQL.ĭoes the person or team who configures or audits the IP firewall rules centrally manage IP firewall rules for many (perhaps hundreds) of databases?

If so, use server-level IP firewall rules. Is the person or team who configures the IP firewall rules prohibited from having high-level permission at the database level? Database-level IP firewall rules can only be configured through Transact-SQL. If so, you must use server-level IP firewall rules. If yes, use server-level IP firewall rules to reduce the number of times that you have to configure IP firewall rules.ĭoes the person or team who configures the IP firewall rules only have access through the Azure portal, PowerShell, or the REST API? That would reduce the depth of your defenses.ĭo users at the IP addresses need access to all databases?

This method avoids using server-level IP firewall rules, which permit access through the firewall to all databases. If yes, use database-level IP firewall rules to grant access. Should users of one database be fully isolated from another database? Server-level versus database-level IP firewall rules
#LEVEL IP FAST IN SAOIF PORTABLE#
Also use them when you have many databases that have the same access requirements, and you don't want to configure each database individually.įor information about portable databases in the context of business continuity, see Authentication requirements for disaster recovery. Use server-level IP firewall rules for administrators. This practice enhances security and makes your database more portable.

We recommend that you use database-level IP firewall rules whenever possible.
#LEVEL IP FAST IN SAOIF HOW TO#
Recommendations for how to set firewall rules For more information about configuring database-level IP firewall rules, see the example later in this article and see sp_set_database_firewall_rule (Azure SQL Database). The default value is up to 256 database-level IP firewall rules for a database.If you specify an IP address range in the database-level IP firewall rule that's outside the range in the server-level IP firewall rule, only those clients that have IP addresses in the database-level range can access the database.

