Who Alerts When The Alerts Are Down?

Chris Bell uses Powershell to alert us when the SQL Agent service goes down:

Now that we have our PS1 file that will send the email alert, but we need to have the job run when the service fails. To set this open up services and right click on the SQLServerAgent service you wish to add the failure alert to and select properties. Navigate to the Recovery tab and set one of the failure actions to “Run a Program” I tend to choose it as the first failure action as I like to look at why my service failed before I just restart it. You can attempt to restart first and then run the program on if it fails again by setting the second failure to run a program. The choice is yours!

Very cool.

Related Posts

Hidden Patterns in SQL Agent Outputs

Solomon Rutzky has found patterns which cause SQL Agent step outputs not to write any details: And that’s when it happened: I started getting a value back from QUOTENAME(ORIGINAL_DB_NAME()), and not just the square brackets with nothing between them. The name of a database was now between the square brackets. Why wasn’t that showing up before? Solomon […]

Read More

Alerting When SQL Agent Jobs Fail

John Shaulis has a script to send out e-mail alerts on SQL Agent job failures: Here we have a T-SQL statement that we can either create as a stored procedure or just run as T-SQL in a job step. It looks back over the last 10 minutes and looks for job failures. I would recommend […]

Read More

Categories

December 2015
MTWTFSS
« Nov Jan »
 123456
78910111213
14151617181920
21222324252627
28293031