Critical Alerting Costs Nothing
Published: Jul 17, 2015
I’ve yet to come across a SQL Server which actually makes use of some of the free alerts which SQL Server will hand you if you let it. These are alerts which are already logged inside of SQL Server and are just waiting for you to set up some notifications around them.

When SQL Server detects that something critical could be going wrong it will happily make a note of this in the error log… but who has the time to trawl through that every day? Therefore we need a simple way to capture these alerts and send them out in an email.

The alerts are as follows:

Simply by reading these you can immediately see how handy it is that SQL Server keeps a track of these and is willing to immediately let you know if it finds one?

So how do we set up these alerts?

That’s actually quite simple.

Expand SQL Server Agent in Management Studio and right click on Alerts…

In the window that opens, name your alert and then select the relevant Severity from the drop down list. In my example I’m setting an alert for a Severity 19 incident…

Then, on the Response tab, you need to select whether you want a job to be executed, or a simple email sent out instead.

In my example, for simplicity, I’m simply selecting myself as an Operator. In the real world I would likely have a job executed and that job would therefore send a more detailed output including snapshots of data from DMVs. However, in this case I’m simply wanting to be notified…

For some additional information to the quick alert you can add some text and the full error alert from the Options tab…

Press OK and we’re done. You now have an alert set up for any severity 19 issues encountered by your SQL Server.

Add the others from the list in the same manner and you’ll be all set to have an early warning system for any potential hardware errors creeping into your system so that you can address them early and hopefully avoid a catastrophic disaster later down the line.
Leave a Comment
Your email address will not be published. All fields are mandatory.
NB: Comments will only appear once they have been moderated.

Your SQL Trainer
Kevin Urquhart

I am a SQL Server DBA, Architect, Developer, and Trainer for SQL Training. This is my blog in which I’m simply trying to share my SQL knowledge and experiences with the world.

Kevin Urquhart
SQL Server Consultant, London

Categories


Archives


Copyright © 2018 London SQL Server Training Courses @ SQL Training | Website Design From Scott Heron