You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### <aid="audit-storage-destination">Audit to storage destination</a>
86
+
### <aid="audit-storage-destination"></a>Audit to storage destination
87
87
88
88
To configure writing audit logs to a storage account, select **Storage** and open **Storage details**. Select the Azure storage account where logs will be saved, and then select the retention period. Then click **OK**. Logs older than the retention period are deleted.
89
89
@@ -102,13 +102,13 @@ To configure writing audit logs to a storage account, select **Storage** and ope
102
102
- When using AAD Authentication, failed logins records will *not* appear in the SQL audit log. To view failed login audit records, you need to visit the [Azure Active Directory portal](../active-directory/reports-monitoring/reference-sign-ins-error-codes.md), which logs details of these events.
103
103
- Auditing on [Read-Only Replicas](sql-database-read-scale-out.md) is automatically enabled. For further details about the hierarchy of the storage folders, naming conventions, and log format, see the [SQL Database Audit Log Format](sql-database-audit-log-format.md).
104
104
105
-
### <aid="audit-log-analytics-destination">Audit to Log Analytics destination</a>
105
+
### <aid="audit-log-analytics-destination"></a>Audit to Log Analytics destination
106
106
107
107
To configure writing audit logs to a Log Analytics workspace, select **Log Analytics (Preview)** and open **Log Analytics details**. Select or create the Log Analytics workspace where logs will be written and then click **OK**.
### <aid="audit-event-hub-destination">Audit to Event Hub destination</a>
111
+
### <aid="audit-event-hub-destination"></a>Audit to Event Hub destination
112
112
113
113
> [!WARNING]
114
114
> Enabling auditing on a server that has a SQL pool on it **results in the SQL pool being resumed and re-paused again** which may incur billing charges.
@@ -193,7 +193,7 @@ If you chose to write audit logs to an Azure storage account, there are several
193
193
194
194
<!--The description in this section refers to preceding screen captures.-->
195
195
196
-
####Auditing geo-replicated databases
196
+
### Auditing geo-replicated databases
197
197
198
198
With geo-replicated databases, when you enable auditing on the primary database the secondary database will have an identical auditing policy. It is also possible to set up auditing on the secondary database by enabling auditing on the **secondary server**, independently from the primary database.
199
199
@@ -205,7 +205,7 @@ With geo-replicated databases, when you enable auditing on the primary database
205
205
>[!IMPORTANT]
206
206
>With database-level auditing, the storage settings for the secondary database will be identical to those of the primary database, causing cross-regional traffic. We recommend that you enable only server-level auditing, and leave the database-level auditing disabled for all databases.
207
207
208
-
####Storage key regeneration
208
+
### Storage key regeneration
209
209
210
210
In production, you are likely to refresh your storage keys periodically. When writing audit logs to Azure storage, you need to resave your auditing policy when refreshing your keys. The process is as follows:
211
211
@@ -220,7 +220,7 @@ In production, you are likely to refresh your storage keys periodically. When wr
220
220
221
221
## <aid="manage-auditing"></a>Manage Azure SQL Server and Database auditing
222
222
223
-
####Using Azure PowerShell
223
+
### Using Azure PowerShell
224
224
225
225
**PowerShell cmdlets (including WHERE clause support for additional filtering)**:
226
226
@@ -233,7 +233,7 @@ In production, you are likely to refresh your storage keys periodically. When wr
233
233
234
234
For a script example, see [Configure auditing and threat detection using PowerShell](scripts/sql-database-auditing-and-threat-detection-powershell.md).
235
235
236
-
####Using REST API
236
+
### Using REST API
237
237
238
238
**REST API**:
239
239
@@ -249,7 +249,7 @@ Extended policy with WHERE clause support for additional filtering:
-[Get Server *Extended* Auditing Policy](/rest/api/sql/server%20auditing%20settings/get)
251
251
252
-
####Using Azure Resource Manager templates
252
+
### Using Azure Resource Manager templates
253
253
254
254
You can manage Azure SQL database auditing using [Azure Resource Manager](../azure-resource-manager/management/overview.md) templates, as shown in these examples:
0 commit comments