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.
Learn more about Azure SQL Database – Enroll to our Online Course!
Enroll to our online course on Udemy titled “Introduction to Azure SQL Database for Beginners” and get lifetime access to high-quality lessons and hands-on guides about all the aspects of Azure SQL Database.
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
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!
Featured Online Courses:
- Boost SQL Server Database Performance with In-Memory OLTP
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- Introduction to Data Science and SQL Server Machine Learning
- Introduction to Azure SQL Database for Beginners
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- How to Import and Export Data in SQL Server Databases
- Learn How to Install and Start Using SQL Server in 30 Mins
- A Guide on How to Start and Monetize a Successful Blog
- 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)
Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018) and a Udemy Instructor. He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.