SQL, how to get work to start work?

I would like to invoke another job right after the first completion, or, to be more precise, you can invoke the whole sql job through the job step. I would like to avoid combining these tasks into 1, so I am wondering if this solution is possible?

+8
sql jobs
source share
3 answers

Yes, you can complete the task using this stored procedure. In your case, you can simply add a step to the end of your first assignment to call up the name of the assignment that you want to do next.

EXEC msdb.dbo.sp_start_job N'Job Name'; 

See sp_start_job (Transact-SQL) for more details.

+4
source share

create a T-SQl step and use EXEC msdb.dbo.sp_start_job N'YourJob';

+1
source share

Call the jobs in the order in which you want to save the stored procedure.

-one
source share

All Articles