2 minute read

Roses are red,
Violets are blue,
Community loves dbatools
dbatools love it too

Author unknown

what dbatools are?

dbatools.io is a set of PowerShell commands to manage SQL Server, contained in a module. Plus, it is open-source, created by people who work with the SQL Server and PowerShell for years. Some say it is a command-line version of SQL Server Management Studio but I think it is more than that.

what SQL community is?

SQL community (or #SQLFamily) is a group of data professionals gathered mainly around Microsoft SQL Server.

X’s and O’s

Those two sets of people have a common part – people who are active members of the community and who contribute to the dbatools, hence all the affection. In most cases it is a win-win situation.

heritage

In this section I am going to present you a few community tools that are available via dbatools.

Install-DbaFirstResponder

A collection of scripts originally written by people behind Brent Ozar Unlimited (blog|twitter), and later on released as an open-source tool.

install the FRK straight from GitHub

Install-DbaFirstResponderKit -SqlInstance $server -Branch main -Database master -WhatIf
<#
What if: Performing the operation "Downloading zip file" on target "https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/archive/main.zip".
What if: Performing the operation "Copying extracted files to the local module cache" on target "LocalCachedCopy".
What if: Performing the operation "Connecting to localhost,1433" on target "localhost,1433".
What if: Performing the operation "Installing FRK procedures in master on localhost,1433" on target "master".
#>

https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit https://www.brentozar.com/responder/

Install-DbaMaintenanceSolution

A very powerful set of functions to manage maintenance activities on SQL Server (backups, indexing, checkdbs) made by Ola Hallengren.

Install-DbaMaintenanceSolution -SqlInstance $server -Database master -InstallJobs -LogToTable -WhatIf 
<#
PS C:\dbatools> Install-DbaMaintenanceSolution -SqlInstance $server -Database master -InstallJobs -LogToTable -WhatIf 
What if: Performing the operation "Installing CommandLog.sql" on target "localhost,1433".
What if: Performing the operation "Installing MaintenanceSolution.sql" on target "localhost,1433".
#>

https://github.com/olahallengren/sql-server-maintenance-solution https://ola.hallengren.com

Install-DbaWhoIsActive

Adam Machanic (blog|twitter) created a stored procedure without which it would be very sad when you are about to troubleshoot your SQL server.

Install-DbaWhoIsActive -SqlInstance $server -Database master -WhatIf  
<#  
What if: Performing the operation "Downloading sp_WhoisActive" on target "DESKTOP-VDRVEN3".
What if: Performing the operation "Unpacking zipfile" on target "DESKTOP-VDRVEN3".
What if: Performing the operation "Reading SQL file into memory" on target "DESKTOP-VDRVEN3".
What if: Performing the operation "Installing sp_WhoisActive" on target "localhost,1433".
#>

https://github.com/amachanic/sp_whoisactive
http://whoisactive.com

Invoke-DbaDiagnosticQuery

Glenn Berry (blog|twitter) changed the DBA world by combining all the useful queries in one place. Whenever there is a performance issue on the server run them and see where it hurts.

https://glennsqlperformance.com/resources/ https://github.com/ktaranov/sqlserver-kit/tree/master/Script

Install-DbaSqlWatch

The ‘youngster’ among community tools within the module. Open-source monitoring solution created by Marcin Gminski (blog|twitter).

https://github.com/marcingminski/sqlwatch
https://sqlwatch.io

Thank you,
Mikey