# Ensure that Microsoft Defender for SQL is set to 'On' for critical SQL Servers

- Source: https://support.icompaas.com/support/solutions/articles/62000229876-ensure-that-microsoft-defender-for-sql-is-set-to-on-for-critical-sql-servers
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [General](https://support.icompaas.com/support/solutions/62000037933) › [Azure Compliance / Control / Check](https://support.icompaas.com/support/solutions/folders/62000168797)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Description:**

Enable "Microsoft Defender for SQL" on critical SQL Servers.

  

**Rationale:**

Microsoft Defender for SQL is a unified package for advanced SQL security capabilities. Microsoft Defender is available for Azure SQL Database, Azure SQL Managed Instance, and Azure Synapse Analytics. It includes functionality for discovering and classifying sensitive data, surfacing and mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database. It provides a single go-to location for enabling and managing these capabilities.

  

**Impact**:

Microsoft Defender for SQL is a paid feature and will incur additional cost for each SQL

server.

  

**Audit:**

**From Azure Portal**

1\. Go to SQL servers For each production SQL server instance:

2\. Click Microsoft Defender for Cloud

3\. Ensure that Enablement Status is Enabled

  

**From PowerShell**

Get the list of all SQL Servers

Get-AzSqlServer

For each Server

Get-AzSqlServerAdvancedThreatProtectionSetting -ResourceGroupName <resource  
group name> -ServerName <server name>

Ensure that ThreatDetectionState is set to Enabled.

  

**Remediation:**

**From Azure Portal**

1\. Go to SQL servers For each production SQL server instance:

2\. Click Microsoft Defender for Cloud

3\. Click Enable Microsoft Defender for SQL

  

**From PowerShell**

Enable Advanced Data Security for a SQL Server:

Set-AzSqlServerThreatDetectionPolicy -ResourceGroupName <resource group name>  
\-ServerName <server name> -EmailAdmins $True

**Note:**

• Enabling 'Microsoft Defender for SQL' from the Azure portal enables Threat Detection

• Using Powershell command Set-AzSqlServerThreatDetectionPolicy enables Microsoft Defender for SQL for a SQL server

  

**Default Value:**

By default, Microsoft Defender for SQL is set to Off.

  

**References:**

1\. [https://docs.microsoft.com/en-us/azure/azure-sql/database/azure-defender-forsql?view=azuresql](https://docs.microsoft.com/en-us/azure/azure-sql/database/azure-defender-forsql?view=azuresql)

2.[https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/getazurermsqlserverthreatdetectionpolicy?view=azurermps6.13.0&viewFallbackFrom=azurermps-5.2.0](https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/getazurermsqlserverthreatdetectionpolicy?view=azurermps6.13.0&viewFallbackFrom=azurermps-5.2.0)

3\. [https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3- data-protection#dp-2-monitor-anomalies-and-threats-targeting-sensitive-data](https://docs.microsoft.com/en-us/security/benchmark/azure/security-controls-v3-%20%20data-protection#dp-2-monitor-anomalies-and-threats-targeting-sensitive-data)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
