Skill 2.1.6
Implement auditing
Key Concepts
Azure SQL auditing is enabled at the server level (applies to all databases) or the database level and writes to an Azure Storage account, a Log Analytics workspace or Event Hubs. The default action groups capture successful and failed authentications and completed batches, and audit logs in Log Analytics can be queried with KQL or viewed in the portal's audit records. Auditing of Microsoft support operations can also be enabled. When server auditing is on, a database audit adds to it rather than replacing it.
SQL Server uses SQL Server Audit: a server audit defines the target (file, Windows Security log or Application log), and server or database audit specifications choose action groups or actions, for example SELECT ON SCHEMA::Sales BY public; sys.fn_get_audit_file reads file targets. Auditing shows what happened; ledger tables complement it by proving that data was not altered afterwards.