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 🤗
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
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
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 💅.
To learn more about prerequisites and installation, please visit installing dbachecks.
Have questions about development? Please visit our creating tests for dbachecks.
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 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.
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!