Description
disabledAlerts lists the alert types an Azure SQL database policy excludes, even while the policy is enabled.
Potential impact
An excluded type can leave responders unaware of suspicious queries until a later investigation.
Remediation
Enable the policy and remove exclusions the team no longer needs. Document any exceptions and check that the intended recipients receive alerts.
Examples
Removing Sql_Injection restores alert coverage for that type. Keep the application’s protections against SQL injection in place.
Before
bicep
resource sample_databases_default 'Microsoft.Sql/servers/databases/securityAlertPolicies@2021-02-01-preview' = {
name: 'sample/databases/default'
properties: {
disabledAlerts: ['Sql_Injection']
emailAccountAdmins: true
emailAddresses: ['sample@email.com']
retentionDays: 4
state: 'Enabled'
}
}
After
bicep
resource sample_databases_default 'Microsoft.Sql/servers/databases/securityAlertPolicies@2021-02-01-preview' = {
name: 'sample/databases/default'
properties: {
disabledAlerts: []
emailAccountAdmins: true
emailAddresses: ['sample@email.com']
retentionDays: 4
state: 'Enabled'
}
}