February 10, 2009 at 12:28 pm
Hi...We have 2 Different Jobs scheduled in 2 Servers....The Job in Server A Starts at 12:00AM and it generally takes 1hr...The second Job in Server B Starts at 1 AM. Both the Jobs are technically related in such a way that job in server B should start after the Job in Server A finished execution. But sometimes The Job in Server A takes like 5 hrs. In this case all the things are getting screwed up as the Job in B will start before A completes execution.
So, Is there any way that we can start the Job in Server B immedietely after Job in server A finished execution?? may be like triggers or something...!!! Please advise me....
Thank you
February 10, 2009 at 12:36 pm
You could create a linked server between Server A and Server B and then run the
EXEC [ServerB].msdb.dbo.sp_update_jobschedule
@job_name = 'JobName',
@name = 'ScheduleName',
@enabled = 1,
@active_start_date = YYYYMMDD,
@active_start_time = HHMMSS
where you programatically figure the time.
February 10, 2009 at 12:52 pm
Thanks for the quick response...
We already have the Linked Server...
So, do we have to Disable the job in server B and then create a Job step with this sp_update_jobschedule proc in Server A ?? Please let me know...
February 10, 2009 at 1:02 pm
You would absolutely have to create a job step on Server A to make the call.
In terms of Server B as long as you have a Schedule set up with the correct name (ScheduleName in my script above) and that schedule is set up to be a One time run (it will just be set up to run one time over and over again) you can leave the job itself enabled. The key is really the schedule of the job, in this scenario.
Let me know if I am making sense, I am happy to explain further if needs be.
February 10, 2009 at 1:56 pm
Sounds good....Let me try this....
Thanks a lot..
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply