Detection: SQL Server Deleted
Overview
Detect when an Azure SQL server was deleted. Azure SQL servers host and manage databases, and their deletion can result in significant data loss and disrupt dependent applications. Monitoring these deletions ensures data integrity and prevents unauthorized or accidental removal of critical database infrastructure.
References:
Usage
Run the detection in your terminal:
powerpipe detection run azure_activity_log_detections.detection.sql_server_deleted
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe detection run azure_activity_log_detections.detection.sql_server_deleted --share
SQL
This detection uses a named query:
select tp_timestamp as timestamp,operation_name as operation,resource_id as resource,caller as actor,tp_index::varchar as subscription_id,resource_group_name as resource_group,tp_id as source_id,status as event_status,*
from azure_activity_logwhere operation_name = 'Microsoft.Sql/servers/delete' and status = 'Succeeded'
order by timestamp desc;