Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created and am using an SQL Agent for the first time. I have searched google but either the info isnot there or I am not getting the keywords correct (SQL agent + back log/callstack overflow etc !).

My agent reads in and does some processing on a (variable) volume of data. I observed an error recently where i deadlocked a database i think due to an issue with the SQL agent and it started me thnking about the following: If I set the schedule frequency to be shorter than the duration that it took to compete the action that is performed by the agent, such that the 2nd action is scheduled while the first is still processing ...and so on. Will this generate an unrecoverable situation by accumulating jobs that it will never have time to process or if the agent starts while a previous job is still running does it just abandon the attempt and check again at the next scheduled interval.

Obviously one wouldnt want to do the above on purpose but it just got me thinking about whether i need to handle for the above possibility.


share|improve this question

migrated from Apr 1 '13 at 5:16

This question came from our site for professional and enthusiast programmers.

Can you please share more details? I guess you've created a SQL Server job that runs multiple times a day and it is involved in a deadlock. Can you tell us what you job does? what frequency it runs? How did you find about the deadlock? – RK Kuppala Apr 1 '13 at 6:00

If you're job is running at the time the next scheduled execution comes along it will be skipped

share|improve this answer

If you want to make sure that Job 2 doesn't start its processing while Job 1 is running, then you could make the first step of Job 2 be a call to sp_help_job, which you can use to check the run status of a job (it's the current_execution_status field).

share|improve this answer

Your Answer


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