Is there a heartbeat?

Posted by Crys on November 4, 2010 in SSMS |

Dammit Jim, I’m a DBA not a doctor!

On our servers we have heartbeats in our SQL Agent Jobs. A heartbeat is a start and end step that we put into each of our jobs. If you do use it, do you use the same terminology or do you have a different word for it? If you’re not using one, I highly recommend it.

For example, compare the two screen shots below. The first one shows a job which has one step in it. The job is currently running. What can you tell by looking at the job history?

The second example shows the job with the same scenario, but it has a Heartbeat.Notification and a Heartbeat.Termination step in it.

The job with the heartbeat has a step that has already completed. If I look at the job history, I have information available if I need to troubleshoot problems with the running job. This would have been very helpful when I was once troubleshooting a job that had been running for multiple days, unexpectedly.

That being said, always test changes before making them – no matter how simple they appear to be. I once modified a job to include the heartbeat steps. It turns out that one of the job steps referenced output files from another step in the job. When I changed the steps around, it was referencing the wrong step’s output file.

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2010-2012 Crys's Crap All rights reserved.
Desk Mess Mirrored v1.8.3 theme from BuyNowShop.com.