sp_delete_database_firewall_rule (Azure SQL Database)

Applies to: Azure SQL Database

Removes database-level firewall setting from your Azure SQL Database. Database firewall rules can be configured and deleted for the master database, and for user databases on SQL Database.


sp_delete_database_firewall_rule [ @name = ] [ N ] 'name'
[ ; ]


[ @name = ] [ N ] 'name'

The name of the database-level firewall setting to be removed. @name is nvarchar(128) with no default value. The Unicode prefix N is optional for SQL Database.


Only the server-level principal login created by the provisioning process, or a Microsoft Entra admin assigned as admin, can delete database-level firewall rules.


Microsoft Entra ID was previously known as Azure Active Directory (Azure AD).


The following example removes the database-level firewall setting named Example DB Setting 1.

EXECUTE sp_delete_database_firewall_rule N'Example DB Setting 1';