In this Azure SQL article, we will discuss the quick steps to configure Azure SQL Database auditing.
How Is Azure SQL Database Auditing Configured?
Well, you can easily configure the Azure SQL Database auditing in the Azure Portal using a few easy steps as below.
- Log in to the Azure Portal (https://portal.azure.com/)
- On your Azure SQL Database page, on the left navigation, click on Auditing which is present under the Security heading. You can click on the View Server settings link if you want to view or modify the settings as highlighted below.
- Now to enable the Azure SQL Auditing, switch Auditing to ON.
- Then, you need to choose the audit log destination where you want to store or write the audit logs. The options are Storage account, Log Analytics, and Event Hub. Based on your requirement, you can click on the Configure option. After configuring the Audit log destination you need to click on the Save button to save the changes.
- Now, if you want to configure the Audit Log Destination as a Storage account or you want to write the audit logs to the storage account then click on the Configure option.
- On the Storage settings window, provide the below details
- Subscription: Provide a valid subscription that you want to use here.
- Storage account: Select an existing storage account or if you don’t have an existing storage account, you can click on the Create button to create a new storage account.
- Retention days: You can select some specific days based on your requirements by sliding the Retention (Days) slider. If you won’t change anything then the default value for the Retention days is zero which means unlimited retention days.
- Storage access key: Select Primary or Secondary based on your need.
Finally, click on the Ok button to Save the changes.
- If you will choose the Audit Log Destination as the Log Analytics option, then click on the Configure option, on the Log Analytics Workspaces window, click on the + Create New Workspaces button to create a new Log Analytics workspace or you can select an existing workspace if you already. You can also select the default workspace if you want.
If you want to select the Audit Log Destination as the Event Hub, then click on the Configure option and on the Select event hub window, you need to provide the below details
- Subscription: Select a valid subscription that you want to use here.
- Event hub namespace: You need to provide the Event hub namespace.
- Event Hub name: It is optional but if you want, you can provide a name for the Event Hub.
- Event hub Policy name: You must provide the Event hub Policy name.
Finally, click on the Ok button.
Once You have configured any of the Audit Log Destination. Finally, click on the Save button on the SQL Database page. This is how to configure Azure SQL Database Auditing.
You may also like following the below articles
In this Azure SQL article, we discussed how to configure Azure SQL Database Auditing. Thanks for reading this article !!!