Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a sql server job that is scheduled to run every 3 hours. Occasionally, the job takes longer than 3 hrs. In that case, the next scheduled run does not occur.

I would like to setup sql server to alert me if this conditions occurs and perhaps log the condition.

share|improve this question

1 Answer 1

There isn't an automatic way to do this. You'll need to put some code into the job step so that if is runs for over 3 hours it alerts you. The easiest way would be to capture the start time and end time do a date diff on it, then send an email, or log an alert to the errorlog.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.