First published on MSDN on Jun 26, 2018
[2018-07-31] Note: new template version is now available. It includes 3 changes:
There is no reason to enable both server policy and database policy. It is enough to enable only server policy.
No need to supply storage account for Threat Detection policy. It is needed only for auditing
Use the updated API version for auditing and Threat Detection (2017-03-01-preview)
I would like to share an example of a template that can be used to deploy server with multiple databases and to turn ON
at server and individual database levels. Please be aware that when server - level auditing is enabled, it is applied to all databases on this server. You can also enable database - level auditing, for example, if different storage account or retention period should be used for a specific database. For more details about server and database - level auditing policy please refer to the following article:
Define server-level vs. database-level auditing policy