0

I have 2 jobs; Job2 is dependant on the completion of Step16 of Job1. All these steps are performing data refresh for different systems. Job1: has 25 steps in a sequenced manner i.e. Step 1 completes then Step2 starts and so on Job2: has only 1 Step, and later we plan to add more steps.

But for now, the problem is I cannot modify the sequence of Job1, and the time taken to complete the steps from Step16 to Step25 is huge. So I cannot add Job2 Step1 as Job1 Step26.

What I need is as my Job2 only care if Step16 of Job1 is complete. Is it possible to trigger Job2 when Job1 Step16 is completed?

  • Yes. Add T-sql command `sp_start_job` to start the other job. Just keep in mind this is asynchronous and you don't know when it finishes or if it succeeded – Nick.Mc Jul 16 '21 at 06:02
  • @Nick.McDermaid thanks for that, I plan to put this T-SQL between Step16 and Step17 but will it affect the start time of Step17 until "Exec sp_start_job" is completed or would it be exec start job and go ahead with Step17 "exec step" – Adityan s nair Jul 20 '21 at 02:40
  • You should try it in non prod and see. Anyway that's what asynchronous means - it starts it and return immediately. You don't know when it finishes or whether it is successful. _Also_ if the job is already running, `sp_start_job` will return an error – Nick.Mc Jul 20 '21 at 02:44

0 Answers0