Automating sql server daily health checks
-
Upload
dean-willson -
Category
Technology
-
view
1.414 -
download
1
description
Transcript of Automating sql server daily health checks
![Page 1: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/1.jpg)
Dean Willson presented to fwPASS on 10/22/2013
*Automating SQL Server Daily Health Checks
![Page 2: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/2.jpg)
*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?
![Page 3: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/3.jpg)
*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
![Page 4: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/4.jpg)
*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)
![Page 5: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/5.jpg)
*References
*http://ola.hallengren.com/
*http://www.brentozar.com/blitz/
![Page 6: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/6.jpg)
*Alert System not configured
![Page 7: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/7.jpg)
*Failed job – no notification
![Page 8: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/8.jpg)
*Desired Result
![Page 9: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/9.jpg)
*Email from within script
![Page 10: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/10.jpg)
*Set up Scheduled Task
![Page 11: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/11.jpg)
*Scheduled Task
![Page 12: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/12.jpg)
![Page 13: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/13.jpg)
![Page 14: Automating sql server daily health checks](https://reader033.fdocuments.in/reader033/viewer/2022042713/548408f8b47959e70c8b4ae5/html5/thumbnails/14.jpg)
*Contact me
*Dean Willson
*Sr. Data Architect at Aunt Millie’s Bakeries
*fwPASS http://fwPASS.org
*LinkedIn http://linkedin.com/in/deanwillson
*Twitter @deanwillson
*Blog http://dean-o.blogspot.com