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.
- dbachecks.io
- dbachecks.io/install
- dbachecks.io/blog
- dbachecks.io/git
- dbachecks.io/twitter
- dbachecks.io/youtube
- dbachecks.io/slack
- dbachecks.io/issues
- dbachecks.io/contributors
- dbachecks.io/git
- dbachecks.io/gallery
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
- Announcing dbachecks – Configurable PowerShell Validation For Your SQL Instances by Rob Sewell
- install dbachecks by Chrissy LeMaire
- dbachecks commands by Chrissy LeMaire
- dbachecks – Using Power BI dashboards to analyse results by Cláudio Silva
- My wrapper for dbachecks by Tony Wilhelm
- Checking backups with dbachecks by Jess Promfret
- dbachecks please! by Garry Bargsley
- dbachecks – Configuration Deep Dive by Rob Sewell
- Test Log Shipping with dbachecks by Sander Stad
- Checking your backup strategy with dbachecks by Joshua Corrick
- Enterprise-level reporting with dbachecks by Jason Squires
- Adding your own checks to dbachecks by Shane O’Neill
- dbachecks – A different approach for an in-progress and incremental validation by Cláudio Silva
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
Pingback: dbachecks commands – dbatools
Pingback: Introducing dbachecks – Curated SQL
This is awesome! You had me at Power BI.
Pingback: introducing dbachecks – a new module from the dbatools team - How to Code .NET
Pingback: Special Agent Jenkins – nvarscar[ ] :: scripting and more
Pingback: SQL DBA Tools – Data Lake
Pingback: dbachecks implementation (part 1) – Database Misadventures
Pingback: Planification Azure SQL Databases–Azure RunBook | Christophe LAPORTE – Consultant SQL Server
Pingback: 10 great tech blogs you should read (that are written by women) | Tom Wrights Code