SQL Agent Job Chaining
It would be a great feature to make SQL Agent Jobs hierarchical so that one (or more) job(s) can be dependent on another job allowing SQL Agent Jobs to be chained together.
Al Howarth commented
OP, Are you requesting dependencies?
IE, Job1, Job2 and Job3 can run anytime during the day. Job4 will start when all three are done?
Just want to be sure what you are asking, so I can vote, or create my own suggestion if I'm misunderstanding. We looked at AutoSys and its dependencies feature is we want to replicate in SQL Agent.
John G Hohengarten commented
I think this could be implemented if Microsoft adds a new SQL Agent Job Step type of `SQL Server Agent Job` (along with the rest of the others like ActiveX Script, Operating system (CmdExec), etc.) found under the "Type" dropdown in New Job Step window. (via right click New Job).
Yeah, we use sp_start_job to start other jobs in a lot of scenarios. It's fairly straight-forward as long as you have the right security in place. We even start jobs on different servers.
Easy enough. T-SQL jobstep using exec msdb.dbo.sp_start_job, potentially dependent on some select from msdb.dbo.sysjobhistory.