HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Chaining SQL Server Agent Jobs

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sqlagentchainingjobsserver

Problem

I have several work packages for each I have setup up a job in sql server agent. Sometimes I should run all together. What is the best way to run them all in a given sequence? I'm a bit surprised that sql server agent is not able to include jobs as job steps to be executed. I did try

Solution

SQL Agent is not considered to be "enterprise class" as a job scheduler. It lacks a lot of functionality that you end up having to build yourself. One such example would be dependencies. As a result you are forced to put most of this logic into SSIS packages. Not necessarily a bad thing...just a pain to build and manage yourself.

So, that's my answer, build out an SSIS package and use some t-sql commands to call SQL Agent jobs as desired. Make sure you have your requirements and scenarios clearly defined. You may not want to have multiple jobs hitting the same tables at the same time, for example.

HTH

Context

StackExchange Database Administrators Q#3605, answer score: 8

Revisions (0)

No revisions yet.