At the completion of Step 1, the job currently goes to step 2 - an osql command to start a Sql Agent job on another server. However at the completion of step 1, I would also like to start a concurrent SQL Agent Job on the same server as the step 1 SQL Agent job. Right now, the jobs are cascaded but I would really like "job 2" and "Job 3" to run at the same time. Any ideas on how to make steps non- sequential?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You can try using the maintenance plans under management folder. There are Execute SQL Server Agent Job task and other task that fit your need. you can design the plan in the way that after a step completion, it run multiple tasks like shown below.
Your current configuration might already be capable of launching the jobs simultaneously.
sp_start_job is asynchronous - if you use that in a job step, it should launch an SQL Agent Job and continue to the next step almost instantly, regardless of whether the other job takes seconds, minutes, or hours.
It might not be perfectly sequential - your steps will still appear as Step 2 and Step 3 - but they should kick off within seconds of each other and run through to completion.