introducing dbachecks – a new module from the dbatools team!

In mid-December, we began working on a new PowerShell module for the SQL Server Community. This free and open-source project can be found in the SQL Server Community Collaborative’s repository. Contributions from the community are welcomed and encouraged 🤗

Intro

dbachecks is a framework created by and for SQL Server pros who need to validate their environments. Basically, we all share similar checklists and mostly just the server names and RPO/RTO/etc change.

This module allows us to crowdsource our checklists using Pester tests. Such checks include:

  • Backups are being performed
  • Identity columns are not about to max out
  • Servers have access to backup paths
  • Database integrity checks are being performed and corruption does not exist
  • Disk space is not about to run out
  • All enabled jobs have succeeded
  • Network latency does not exceed a specified threshold

We currently provide over 80 checks, as can be easily seen using Get-DbcCheck:

How to use

Usage can be approached in two ways:

Run directly from the command line

As simple as Invoke-DbcCheck -SqlInstance sqlprod01 -Checks SuspectPage, LastBackup

Schedule checks

Command line execution is good in a pinch, but ongoing checks are the ultimate goal. In order do this, you can do the following:

  • Set your desired configuration
    Configs can be set for specific environments like Production, Test or Development or for an application, like SharePoint or a custom-built app
  • Export your configuration
    Export your environment or application configuration so that it can be easily imported by your scheduled task
  • Schedule checks using Task Scheduler or SQL Server Agent
    I personally prefer Agent
  • Get notified via email or load up in Power BI

Check out our commands post page for more information.

Power BI is awesome

dbachecks also includes a built-in Power BI dashboard and it’s gorgeous 💅.

Whaaaaaat! Thanks to Cláudio Silva and Rob Sewell for that work of art. And thanks to Rob for making a sample dashboard available online.

Install

To learn more about prerequisites and installation, please visit installing dbachecks.

Development

Have questions about development? Please visit our creating tests for dbachecks.

Website

Unlike dbatools, there is no dedicated website for dbachecks at this time. The domain dbachecks.io does exist, however, and will be used for shortlinks <3.

License

dbachecks is MIT licensed

The MIT license is a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.

Learn more

This post just touched on an overview of the new dbachecks module. To learn more about dbachecks, check out these posts

If you have any questions, join us in #dbachecks on the SQL Server Community Slack.

Thanks for reading and we look forward to your feedback!
- Chrissy

9 thoughts on “introducing dbachecks – a new module from the dbatools team!

  1. Pingback: dbachecks commands – dbatools

  2. Pingback: Introducing dbachecks – Curated SQL

  3. Pingback: introducing dbachecks – a new module from the dbatools team - How to Code .NET

  4. Pingback: Special Agent Jenkins – nvarscar[ ] :: scripting and more

  5. Pingback: SQL DBA Tools – Data Lake

  6. Pingback: dbachecks implementation (part 1) – Database Misadventures

  7. Pingback: Planification Azure SQL Databases–Azure RunBook | Christophe LAPORTE – Consultant SQL Server

  8. Pingback: 10 great tech blogs you should read (that are written by women) | Tom Wrights Code

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.