Information is at the heart of most software systems and the lifeblood of many organizations, so you want the database that stores this information to be efficient and reliable. But as we know, things happen; sometimes bad things. One of the ways that we can prevent bad things from happening is to know about them in advance like the old saying says, "To be forewarned is to be forearmed."
Azure SQL in its many forms has an abundance of features that help you to monitor the state of your databases and database server. Ranging from prebuilt automated monitoring that is augmented with artificial intelligence through to dynamic management views, SQL Server monitors and logs all aspects of the database engine’s operation and configuration. Intelligent Insights and Azure SQL analytics enable you to easily access the wealth of diagnostic and performance data in an easily digestible format.
This course introduces you to the different database monitoring and notification technologies available, how they work, and how to use them. If you have any feedback relating to this course, feel free to contact us at support@cloudacademy.com.
Azure SQL and SQL Server Query Performance Tuning
Learning Objectives
- Understand the key elements of database monitoring
- Learn about the features of Intelligent Insights, Azure's AI-based database monitoring service
- Create graphical reports using SQL Server Management Studio
- Understand how wait statistics can show you where threads have to wait and how this can be used to monitor performance
- View and fix index fragmentation
- Monitor database storage
- Implement notification alerts on various database platforms
Intended Audience
This course is aimed at database administrators or anyone who wants to learn how to implement systems that can find potential issues that may disrupt the delivery of their database services.
Prerequisites
To get the most out of this course, you should have experience with SQL Server Management Studio, be familiar with reading and writing SQL, and have an understanding of basic database architecture and administration tasks, like indexes and backups.
Course Related SQL Scripts
https://github.com/cloudacademy/azure-sql-database-monitoring-dp-300
As we've seen, there is an abundance of metrics and telemetry for all SQL Server based databases, whether that's hosted in Azure or on-premise. However, it is impractical, let alone incredibly boring, to have someone just sit there looking at the data waiting for a critical issue to crop up. All versions of Azure SQL databases have mechanisms for notifying you of any number of situations, be they critical or just of interest.
The criteria for sending a notification can be a metric exceeding a static threshold or dynamic when a metric exceeds an average value by some margin. Dynamic notifications utilize Azure AI technology to look for unusual or outlier data or behavior on the selected metrics. When I say, by some margin, this means setting the threshold sensitivity to low, medium, or high, meaning an alert will be triggered when the metric deviates from nominal values either by a little or a lot.
Notifications can be sent via email, SMS message, push notification to an app, or a voice phone call. Azure SQL database and managed instance support alerts based on metrics, while Azure SQL has standalone alert functionality. SQL Server has alert functionality as part of the SQL Server Agent.
Let's now look at how we might set up an alert through the Azure portal. Sticking with the storage theme, I'm gonna set up a static alert for when my database size exceeds a particular value.
Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard.