Automating sql server daily health checks

Preview:

DESCRIPTION

Presentation on using a PowerShell script to query a list of SQL Servers against the msdb databases for failed jobs and other exceptions for a daily email list of all the issues that occurred the previous day.

Citation preview

Dean Willson presented to fwPASS on 10/22/2013

*Automating SQL Server Daily Health Checks

*Why a Daily email?

*Peace of Mind

*Redundancy

*One place to see exceptions

*Notifications: on success, on fail, or both?

*40 success emails/day (full). Hundreds/day (log). Did I get them all?

*What could I be missing?

*Deleted or missing Agent schedule

*Disabled agent job

*No mail profile (ex: restored user databases, but not master)

*Alert system not configured

*Job notification not configured

*Agent turned off

*Exchange was down

*System Components

*Administrative utility database (or at least a table) to store the daily check results from each server

*Scheduling method to run jobs like backups, index rebuilds, consistency checks, etc.

*Text file list of SQL Servers/Instances to check

*Powershell script to query the servers

*Method to schedule the PoSH script (Scheduled Task)

*Reporting Services (Improved, but optional)

*References

*http://ola.hallengren.com/

*http://www.brentozar.com/blitz/

*Alert System not configured

*Failed job – no notification

*Desired Result

*Email from within script

*Set up Scheduled Task

*Scheduled Task

*Contact me

*Dean Willson

*Sr. Data Architect at Aunt Millie’s Bakeries

*fwPASS http://fwPASS.org

*deanowillson@gmail.com

*LinkedIn http://linkedin.com/in/deanwillson

*Twitter @deanwillson

*Blog http://dean-o.blogspot.com

Recommended