balaweblog
balaweblog

Reputation: 15470

Sequential Scheduling of Jobs

We have scheduled a number of jobs in SQL Server 2000. We want these jobs to be executed in a sequential order i.e. the failure of one job should prevent the next job from running. Can someone help me on doing this or creating dependency between scheduled jobs.

Upvotes: 2

Views: 1085

Answers (3)

serkan
serkan

Reputation: 603

Rather than combining the jobs in to one single block, it is better to divide in to pieces to simplify the error detection and make the management easier. It gives you to control your process step by step. If your SQL jobs can be executed via batch files, you can use windows task scheduler and define dependencies. But if the subject is more complex ETL process management, it is better to manage this process on a job scheduler.

Upvotes: 2

John
John

Reputation: 5834

I've done this in a queue system to cache data where there were 4 or 5 steps involved and had to allow delays for replication between the steps.

It was rather time consuming to implement as there were parent tasks which spawned 1 to n child steps which sometimes needed to be executed in order, sometimes irrelevant.

If you go down this path, you then need to create a location for error messages and process logs.

I highly recommend if in any way it can be created as one job with multiple steps, you should use the existing jobs agent. Each individual step can be configured to exit on fail, continue on fail, email on fail, etc - It's rather flexible.

Upvotes: 0

splattne
splattne

Reputation: 104070

You could define your jobs as steps of one single job. So you'll can specify on every step if the next step should be executed in case of error.

Upvotes: 4

Related Questions