DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Enterprise AI Trend Report: Gain insights on ethical AI, MLOps, generative AI, large language models, and much more.

2024 Cloud survey: Share your insights on microservices, containers, K8s, CI/CD, and DevOps (+ enter a $750 raffle!) for our Trend Reports.

PostgreSQL: Learn about the open-source RDBMS' advanced capabilities, core components, common commands and functions, and general DBA tasks.

AI Automation Essentials. Check out the latest Refcard on all things AI automation, including model training, data security, and more.

  1. DZone
  2. Refcards
  3. Database Monitoring
refcard cover
Refcard #280

Database Monitoring

Thanks to DevOps, databases are managed in a very different way, and both DBAs and developers need to monitor performance, security, backups, file size, and job outcomes.

Free PDF for Easy Reference
refcard cover

Written By

author avatar Matt Hilbert
Technology Writer, Redgate Software
Table of Contents
► The Changing Face of Database Monitoring ► The Top Five Metrics to Monitor
Section 1

The Changing Face of Database Monitoring

Database monitoring has always been central to the role of Database Administrators (DBAs) to minimize downtime and optimize performance. Scheduled monitoring keeps an eye on resource usage like CPU, disk space, memory, and I/O capacity to spot trends and understand when more capacity will be needed. The same information also enables baselines to be established so that, for example, it is immediately apparent if a high-resource utilization is an abnormal spike, a worrying recent trend, or just normal behavior for the period in question.

Alongside scheduled monitoring, reactive monitoring also has its place in responding to alerts about a drop in performance or an increase in deadlocks, and drilling down to the cause of the problem before it becomes an issue. Here, the history and timelines which monitoring provides will help to identify if a stress phenomenon coincides with a particular type of processing, such as a weekly aggregation or a scheduled data import.

All of this will be familiar to any DBA, but the way databases are developed and managed has seen a big change over the last few years, driven by the adoption of DevOps, the move from on-premises to the cloud, and increasing concerns about data privacy. These three factors are introducing new challenges to database monitoring that every DBA needs to be aware of.

DevOps, for example, encourages the frequent release of small changes to applications, and those changes often mean the database needs to be updated as well. This was highlighted in Redgate’s 2018 State of SQL Server Monitoring report which revealed that almost 50% of respondents deploy database changes multiple times a week. That’s a big change from a few years ago when deployments were often major events, regarded with trepidation and planned carefully to allow for the expected downtime failed deployments would cause.

The cloud has also become mainstream, and the same report showed that 48% of respondents are already using some cloud technology, and moving to the cloud is their biggest concern. Interestingly, SQL Server implementations on Azure and Amazon are the most common cloud technologies used, and this will probably increase now that Azure SQL Managed Instances provide near 100% feature compatibility with on-premises SQL Server, yet also offer the benefits of a cloud service. The task here will be monitoring a mixed server estate, with legacy systems remaining on-premises, and new systems moving to the cloud.

And then there’s the privacy question. With new requirements for access to personal data to be restricted, there are demands on DBAs to monitor access rights and privileges – and demonstrate that such a system is in place.

Despite all these changes, many of the reasons for monitoring databases and the methods of doing so remain the same. This Refcard focuses on SQL Server databases but the broad principles are the same for any database. DBAs and systems administrators should make the most of built-in tools and resources but also call on third-party tools where necessary to manage their own server estate in the way their business demands.

Section 2

The Top Five Metrics to Monitor

Being a DBA is much more than knowing how to install a server and set up a database. One of the most important responsibilities is being proactive by monitoring instances to identify potential problems. But what should be monitored and why? Here are the top five things to monitor in the new era where DevOps, the cloud, and data privacy have entered the picture.

#1 Performance

Monitoring database performance has traditionally been about taking baselines, watching resource utilization (CPU, memory, I/O) changes over time, and determining the top ten or so worst performing queries so you can tune them.

With the database increasingly expected to be included in DevOps, leading to more changes, more often, another added measure has come into play. However thorough the testing regime is in development, a change can reach production which slows down performance, so monitoring the effect frequent changes have, at the time they are deployed, also needs to be added to the list.

#2 Security

The introduction of the GDPR, as well as upcoming legislation like New York’s Stop Hacks and Improve Electronic Data Security Act (SHIELD) and the California Consumer Privacy Act (CCPA) have put the spotlight firmly on security. Indeed, the SQL Server Monitoring report mentioned in the introduction revealed that security and protection are the biggest challenge for those responsible for managing SQL Server estates.

So, as well as keeping track of failed logins and how many accounts are in the sysadmin group, DBAs also need to be monitoring for SQL injection attacks, changes in server and database settings, and modifications to permissions, users, and roles.

#3 Backups

There are exceptions, but just about every database should be backed up on a regular basis, including frequent transaction log backups. Unless you have a job in place to back up every database on an instance by default, it’s easy to miss adding new databases. By the way, make sure you have a process in place to test backup files as well.

#4 File Growth

Over time, database files can run out of free space as can the volumes where these files live. Transactions must consequently wait while database files grow, and applications will grind to a halt if there is no more space in the files or space runs out on the volume. While the cloud offers elasticity and the ability to grow volumes almost instantly, this is still the case for on-premises servers.

#5 Job Outcomes

Great DBAs automate everything they can and use SQL Server Agent or some other job scheduler to run the scripts. They understand what the jobs do and the consequences of a job failure or long running job. They also have every job documented so that they can take a day off once in a while.

This is a preview of the Database Monitoring Refcard. To read the entire Refcard, please download the PDF from the link above.

Like This Refcard? Read More From DZone

related article thumbnail

DZone Article

Application Database Monitoring: The Middle Way
related article thumbnail

DZone Article

How to Monitor MySQL Deployments With Prometheus and Grafana at ScaleGrid
related article thumbnail

DZone Article

Maximize Kubernetes Security: Automate TLS Certificate Management With Cert-Manager on KIND Clusters
related article thumbnail

DZone Article

Combatting the 3 AM Ransomware Menace
related refcard thumbnail

Free DZone Refcard

Core PostgreSQL
related refcard thumbnail

Free DZone Refcard

NoSQL Migration Essentials
related refcard thumbnail

Free DZone Refcard

Mobile Database Essentials
related refcard thumbnail

Free DZone Refcard

Distributed SQL Essentials

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.linkDescription }}

{{ parent.urlSource.name }}
by
DZone Core CORE
· {{ parent.articleDate | date:'MMM. dd, yyyy' }} {{ parent.linkDate | date:'MMM. dd, yyyy' }}
Tweet
{{ parent.views }} ViewsClicks
  • Edit
  • Delete
  • {{ parent.isLocked ? 'Enable' : 'Disable' }} comments
  • {{ parent.isLimited ? 'Remove comment limits' : 'Enable moderated comments' }}