Azure by Patrik

Difference Between Server-Level and Database-Level Firewall Rules in Azure SQL

Azure SQL uses a layered firewall model:

  • Server-level firewall rules: These define allowed IP address ranges for the entire logical SQL server. Any database under that server inherits these settings.
  • Database-level firewall rules: These are stored within an individual database and apply only to connections to that database.

When to use each:

  • Use server-level rules when multiple databases need the same IP access.
  • Use database-level rules when access needs to be restricted to specific databases or when users lack server-level permissions.

Example:

  • Allowing your organization’s office IP to access all databases? → Use server-level.
  • Granting temporary access to a consultant for one database? → Use database-level.

Reference: Rishan Digital – Firewall Rules and Authentication

azure-sql
firewall-rules
database-security
access-control
networking

Comments