26 Validating your estate with dbachecks

 

For decades, most of the team writing this book had our own daily/weekly/monthly checklists to validate our SQL Server environments. At least once each day, we’d ensure that backups were scheduled and working as required. We’d check to see whether all of our integrity checks passed. We’d even spend a lot of time keeping our checklists up to date as our environment grew, and we learned more about managing SQL Server. Some of us performed this validation manually, whereas others created an automated routine that would perform the checks automatically.

What we didn’t have for all those years was a single, community-wide checklist—nor did we have have a free and open source framework to make our checks easier. Not having those meant a lot of wasted time and repeated work!

To address this problem, the SQL PowerShell community came together to create crowdsourced checks using dbatools and Pester (sqlps.io/pester) tests. This project became known as dbachecks.

26.1 What dbachecks and dbatools have in common

You may be wondering why we dedicated a chapter to dbachecks, a totally distinct PowerShell module from dbatools, in a book about dbatools. We did so for a number of reasons, including the following:

26.2 Our first check

26.3 Viewing all available checks

26.4 Configuring the check parameters

26.5 Storing the output data in a database

26.5.1 Storing data

26.5.2 Power BI dashboard

26.5.3 Configuring the connection

26.6 Hands-on lab