Enabling auditing in Azure SQL Database is a very good idea, since it allows you get alerts on a variety of actions and behaviors. Since data is the most valuable asset in any organization, it is always a good idea, if not a necessity, not only having your database servers and instances secured, but also having them audited. Read on to learn more about auditing in Azure SQL Database.
Different Ways to Enable Auditing in Azure SQL Database
To enable auditing, you can either navigate directly to Azure SQL Database, click on “Auditing” and turn it ON, along with following the on-screen instructions, or you might get an Azure Advisor recommendation to do it.
In either way, you will end up to the same setup dialogs.
Featured Online Course: Introduction to Azure SQL Database
- Get started with Azure SQL Database and SQL Server on Azure Virtual Machines fast and easy!
- Many live demos and guides included!
- Lifetime access
Example of Enabling Azure SQL Database Auditing via an Azure Advisor’s Recommendation
In the example I’m presenting below, I follow the second way, where I have received an Advisor recommendation for my test Azure SQL Database instance.
The recommendation to enable Auditing for Azure SQL Database
So, in the first screen below, you can see that I was recommended to enable Auditing.
Since I agreed with the recommendation, I proceeded and chose to enable it and set “Log Analytics” as the audit log destination.
Create a Log Analytics workspace
So, the first step is to create an OMS workspace along with a Log analytics workspace:
Great. Now, Auditing is enabled and Log Analytics is set as the audit logs destination.
Create an Alert Rule
The next step is to see how we can create Alert Rules. In the below screenshot, I’m creating a new alert rule.
To this end, I have to:
- Specify alert condition
- Define alert details
- Define action group
As you can in the above screenshot, I have created an alert rule with the following characteristics:
- The alert target are All SQL servers.
- The alert criteria is to trigger an alert whenever anyone deletes an Azure SQL Server (any status).
- In the alert details I selected the resource type and group, and raised the level to “Critical”.
- As an action group I created one which I named “Test” and set as an action to send me an email whenever the alert is triggered.
That’s it! Whenever an action that matches the alert criteria takes place, I will be notified by an email alert.
This was a simple example of how you can enable Azure SQL Database Auditing, after you get an Azure Advisor recommendation. However, you should not wait for an Advisor’s recommendation to do this. Since data is the most important asset within an organization, you should always have Auditing enabled, accompanied by a set of carefully designed alert rules and actions. This, can help you have more control on what’s going on not only with Azure SQL Database, but also with any resource you have on Azure.
Learn more about Azure SQL Database and get started fast and easy! Through our online course, you will get lifetime access to a comprehensive set of lectures and live demonstrations that will get you started with Azure SQL Database in no time! The course is regularly updated with additional educational material!Enroll Now with Discount!
Featured Online Courses:
- Essential SQL Server Administration Tips
- The Philosophy and Fundamentals of Computer Programming
- Introduction to Azure SQL Database
- SQL Server 2019: What’s New
- Entity Framework: Getting Started (Ultimate Beginners Guide)
- SQL Server Fundamentals (SQL Database for Beginners)
- How to Import and Export Data in SQL Server
- Get Started with SQL Server in 30 Minutes
- Azure Cosmos DB: Learn by Example
- Learn Azure SQL Database: Creating your First Database
- How to Create an Azure SQL Server Virtual Machine
- How to Backup a SQL Server Database from On-Premises to Azure Storage
- Learn Azure Data Lake Analytics by Example
- What is Azure Advisor?
- … all our Azure-related articles
Check our latest software releases!
Easily generate SQL code snippets with Snippets Generator!
Convert static T-SQL to dynamic and vice versa with Dynamic SQL Generator.
Secure your SQL Server instances with DBA Security Advisor.
Benchmark SQL Server memory-optimized tables with In-Memory OLTP Simulator.
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
© 2018 SQLNetHub