dbachecks! DBA Checklists: Reliable, Repeatable, & Automated

Slides:



Advertisements
Similar presentations
Maintaining a Microsoft SQL Server 2008 Database SQLServer-Training.com.
Advertisements

Using the WDK for Windows Logo and Signature Testing Craig Rowland Program Manager Windows Driver Kits Microsoft Corporation.
Michael Still Google Inc. October, Managing Unix servers the slack way Tools and techniques for managing large numbers of Unix machines Michael.
1 The EDIT System, Overview European Commission – Eurostat.
Infrastructure as code. “Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal.
Copyright © New Signature Who we are: Focused on consistently delivering great customer experiences. What we do: We help you transform your business.
Rob Sewell Making PowerShell Useful Real-Life Examples of Powershell in Action Slides available here -
Others Talk, We Listen. Managing Database Projects in Visual Studio 2013.
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Securing SQL Server Processes with Certificates
Stress Free Deployments with Octopus Deploy
Tips for SQL Server Performance and Resiliency
Project Center Use Cases
PowerShell is Happening FOR REAL THIS TIME!!!
Database Corruption Advanced Recovery Techniques|
Schrödinger’s Backup Will your recovery work?
Turning Your Checklists
Fun with Reporting Services Tools
[+] Title Should Be 'Introduction to Pester‘ 89ms
Simplifying XEvents Management with dbatools
Administrating SQL Server with PowerShell dbatools
Solving ETL Bottlenecks with SSIS Scale Out
SharePoint Saturday Omaha April 2016
Reliable, Repeatable, Configurable & Automated Validation with
Administrating SQL Server with PowerShell dbatools
Tips for SQL Server Performance and Resiliency
dbatools! The reason to finally start learning and using Powershell
Making PowerShell Useful
Database Corruption Advanced Recovery Techniques
Administrating SSRS without boring web based clicks!
SharePoint 2019 Changes Point of View.
Making PowerShell Useful
Re-Indexing - The quest of ultimate automation
Migrating your SQL Server Instance
Use PowerShell & dbatools to Manage your SQL Server Environment
Chrissy LeMaire, MVP & Rob Sewell, MVP
dbatools - PowerShell and SQL Server Working Together
Unit testing for your database infrastructure
PowerShell for Data Professionals
Database Corruption Advanced Recovery Techniques
Database Corruption Advanced Recovery Techniques
dbatools! The reason to finally start learning and using Powershell
How to Perform A Health Check By Edward Roepe Perimeter DBA, LLC
Reliable, Repeatable, Configurable & Automated Validation with
PowerShell & PowerBi Reducing DBAs Context Switching
Making PowerShell Useful
PowerShell & PowerBi Reducing DBAs Context Switching
PowerShell & PowerBi Reducing DBAs Context Switching
Making PowerShell Useful
Automating the install and upgrade of SQL scripts
PowerShell & PowerBi Reducing DBAs Context Switching
Commands for SQL Server
Get your ETL flow under statistical process control
Patrick Flynn | Link Group Australia
Administrating SQL Server with PowerShell dbatools
Test and Verify Instances with DBAchecks
Reliable, Repeatable, Configurable & Automated Validation with
Use PowerShell & dbatools to Manage your SQL Server Environment
Administrating SQL Server with PowerShell dbatools
Gold Sponsors.
GitHub 101 Using Github and Git for Source Control
dbatools! The reason to finally start learning and using Powershell
Michael Wall Senior DBA, Great Western Malting
Managing and monitoring SQL Server on Linux from the command line
Using Dbatools to Automate Database Migrations
What it is and why you should use it
Database Testing Adam Anderson
The DBA Quit and now you’re it:
Life Hacks: dbatools Edition
Presentation transcript:

dbachecks! DBA Checklists: Reliable, Repeatable, & Automated Patrick Flynn | Link Group Australia dbachecks! DBA Checklists: Reliable, Repeatable, & Automated

Please Support Our Sponsors

Who Am I Patrick Flynn MCM – SQL Server 2008 MCSM – Data Platform email sqllensman@outlook.com MCM – SQL Server 2008 MCSM – Data Platform Production DBA for (too many) years. @sqllensman Patrick Flynn

Agenda: Background Goals and Challenges Solution Demo

Background Arose from need to evaluate By Instance,

Checklists are for everyone What do Johns Hopkins surgeons, anonymous big-time investors and Pilots have in common? This isn’t the set up for a terrible joke but a demonstration of how widespread an often-overlooked tool is – they all use checklists to avoid disaster. The Checklist Manifesto, written by writer/surgeon Atul Gawande, is proof that checklists really work.

dbatools Community project, initially started out as Start-SqlMigration but has grown into a DBA’s best friend. dbatools currently sports 390+ commands. dbatools is a free PowerShell module with over 300 SQL Server best practice, administration and migration commands included.

What is Pester: Test Runner for PowerShell A Unit Testing Framework An Infrastructure Testing Framework Comes pre-installed with Windows. https://www.youtube.com/watch?v=lNCR5yLSwi0 -- Test your Powershell with Pester and PSScriptAnalyzer “Untested Code is Broken Code” Infrastructure Testing with Pester - https://www.youtube.com/watch?v=zSEK74_fsLw Pester is a unit-testing framework for PowerShell, and perhaps the first open-source software product that ships with Windows itself! Author Adam Bertram will walk you through the Pester philosophy, syntax, and numerous real-world examples in this "Agile-published" book. The Pester Book https://leanpub.com/creatinghtmlreportsinwindowspowershell https://leanpub.com/powershell-scripting-toolmaking https://leanpub.com/pesterbook

Goals and Challenges

Goals: Create redistributable, easily configurable Pester tests using industry leaders checklists Enable output to suit the requirements of different types of end users human and machine Capability to provide response/resolution ? https://www.youtube.com/watch?v=lNCR5yLSwi0 -- Test your Powershell with Pester and PSScriptAnalyzer “Untested Code is Broken Code” Infrastructure Testing with Pester - https://www.youtube.com/watch?v=zSEK74_fsLw Pester is a unit-testing framework for PowerShell, and perhaps the first open-source software product that ships with Windows itself! Author Adam Bertram will walk you through the Pester philosophy, syntax, and numerous real-world examples in this "Agile-published" book. The Pester Book https://leanpub.com/creatinghtmlreportsinwindowspowershell https://leanpub.com/powershell-scripting-toolmaking https://leanpub.com/pesterbook

Challenge - User Simplicity End Users Need simplicity to enable easy adoption Need index for Checks Need index for Configuration Simplified output options File system access to work across many differing user environments and permissions

Challenge - Configuration Writing Pester Tests for one SQL instance is easy Writing slightly different Pester Tests for slightly different instances is copy and paste It is possible to parameterize Pester tests (but not so easy to say!)

Challenge - Configuration Be able to Pester test a SQL environment like Production, UAT, DEV - horizontal  Be able to Pester test a whole applications SQL environments – vertical  Be able to Pester test the SQL estate for a solution – block 

Challenge - Output DBAs may need output instantly

Challenge - Output DBAs may want to automate and integrate with other solutions (DevOps, Daily Checks, Incident Response, Maintenance Windows)

Challenge - Output Management want output they understand

Solution

dbachecks

dbachecks dbachecks is a framework created by and for SQL Server pros who need to validate their environments. This open source 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 Basically, we all share similar checklists and mostly just the server names and RPO/RTO/etc change.

Dbachecks – User Simplicity Simple Execution Invoke-DbcCheck

Dbachecks – User Simplicity Simplified Output Send-DbcMailMessage Update-DbcPowerBiDataSource Start-DbcPowerBi

Dbachecks – User Simplicity Simple Indexing Commands Get-DbcCheck Get-DbcConfig Get-DbcTagCollection

Dbachecks – Configuration Using PSFramework to create configuration items Over 120 configuration items available right now (May 2018) Enabling Users to set configuration Set-DbcConfig -Name app.sqlinstance -Value sql2016, sql2017 Set-DbcConfig -Name app.sqlinstance -Value sqlcluster –Append

Dbachecks – Configuration Stored in registry Export and Import the config Export-DbcConfig -Path C:\Users\Beard\git\PesterConfigs\Application1_PROD.json Export-DbcConfig -Path C:\Users\Hair\git\PesterConfigs\Client1_System2_Quick.json Import-DbcConfig -Path Git:\PesterConfigs\Application1_PROD.json Invoke-DbcCheck Import-DbcConfig -Path Git:\PesterConfigs\Client1_System2_Quick.json

Dbachecks – Output Invoke-DbcCheck wraps Invoke-Pester so results available at command line

Dbachecks – Output Invoke-DbcCheck can output XML (same as Invoke-Pester ) Import-DbcConfig -Path $(System.WorkingDirectory)\PesterConfigs\Application.json Invoke-DbcCheck -Show Summary -PassThru -OutputFile $(System.WorkingDirectory)\Test-Results.xml Alllows results to be integrated with other systems

Dbachecks – Output Output Data as PowerBI Dashboard Report

Demo’s of Backup Script Maintenance Plans Ola Hallengren Minion Backup

Installation PowerShell Gallery (PowerShell v5+) Install-Module dbachecks * Install-Module dbachecks –Scope CurrentUser * Automatically installs required modules Requires PowerShell v4

Questions

Please Support Our Sponsors

Social Make sure you tweet on #SQLSat710 or #SQLSatEdmonton Don’t forget to thank Volunteers and other Speakers!

Thank You

Asking Questions via Slack Go to sqlslack.com to get an automatic invite. Sign in at sqlcommunity.slack.com Join the #powershellhelp channel. Also a dedicated #dbachecks Ask questions! ( people are friendly  ) Further information: dbatools.io/slack/

dbachecks Links Announcing dbachecks – Configurable PowerShell Validation For Your SQL Instances by Rob Sewell introducing dbachecks - a new module from the dbatools team! by Chrissy LeMaire 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 Checking your backup strategy with dbachecks by Joshua Corrick 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