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.
Conclusion
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!
Learn More
- MS Docs article on Azure SQL Database auditing
- Aure Advisor
Featured Online Courses:
- Introduction to Azure SQL Database for Beginners
- SQL Server 2019: What’s New – New and Enhanced Features
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Administration Tips
- Boost SQL Server Database Performance with In-Memory OLTP
- Essential SQL Server Development Tips for SQL Developers
- Working with Python on Windows and SQL Server Databases
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- Introduction to SQL Server Machine Learning Services
- 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
- Introduction to Azure Database for MySQL
Read Also
- Main Benefits of Using Azure Cloud Services
- The Three Categories of Cloud Services (IaaS, PaaS, SaaS)
- Available MySQL Deployment Options in Azure
- Introduction to Azure Database for MySQL (Course Preview)
- 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?
- Tip of the Week No.11 – Capital Expenditure (CapEx) vs. Operational Expenditure (OpEx)
- Tip of the Week No.12 – Data Service Offerings on Azure
- … 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)
© SQLNetHub
Artemakis Artemiou, a distinguished Senior Database and Software Architect, brings over 20 years of expertise to the IT industry. A Certified Database, Cloud, and AI professional, he earned the Microsoft Data Platform MVP title for nine consecutive years (2009-2018). As the founder of SQLNetHub and GnoelixiAI Hub, Artemakis is dedicated to sharing his knowledge and democratizing education on various fields such as: Databases, Cloud, AI, and Software Development. His commitment to simplicity and knowledge sharing defines his impactful presence in the tech community.