Install community tools with dbatools

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

Author unknown

what dbatools are?

dbatools.io are 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".
#>

Resources:
SQL Server First Responder Kit on GitHub
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 maste1r -InstallJobs -LogToTable -WhatIf 
<#
PS C:\Users\micha\OneDrive\learn\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".
#>

Resources:
Sql Server Maintenance Solution on GitHub
ola.hallengren.com

Install-DbaWhoIsActive

Adam Machanic (blog|twitter)

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".
#>

Resources:
sp_whoisactive on GitHub
http://whoisactive.com

Invoke-DbaDiagnosticQuery

Glenn Berry (blog|twitter)
Resources:
https://www.sqlskills.com/blogs/glenn/category/dmv-queries/
https://glennsqlperformance.com/2020/09/01/sql-server-diagnostic-information-queries-for-september-2020/
https://github.com/ktaranov/sqlserver-kit/tree/master/Scripts

Install-DbaSqlWatch

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

Resources:
sqlwatch on GitHub
sqlwatch.io

Posted in:

1 Comment on "Install community tools with dbatools"

Leave a Reply