1

Fellow DBAs, I need some practical advice on how to solve a job timing issue on different servers. I have a SQL Agent job that currently has steps 1-10. Step #8 has a dependency on a SQL Agent job on another box completing successfully. What is the best approach in checking to see what state this job is in? Do I place Step #8-10 as a separate job that launches from the original job, after adding a step to the original job that queries the agent job status on the other box? If successfully completed--launches the new job? How would you suggest I manage situations where the job that is the dependency is still running? I'm open to suggestions.

2
  • 1
    check sysjobhistory to make sure it has completed, if not, WAITFOR how ever long you want and check again?
    – S3S
    Commented Nov 14, 2018 at 21:45
  • 2
    An option might be to split 8-10 into a separate job. Then add a step on the remote server to use a linked server (need proper authority on original server to start a job) pointing back to the original server and run sp_start_job when the remote server process completes. You may not be willing to open this up for security reasons. Commented Nov 14, 2018 at 21:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.