Trigger JOBS

  • how to trigger a job after completion of another job in sql server management studio 2005

    I have two JOBS A and B in JOB Activity monitor

    I want to trigger JOB B automatically after completion of JOB A

  • Do you need two jobs? You can put JOB A as the first step and JOB B as the second step in one job?

  • How to create two jobs into one?

  • Open the properties of the first job.

    Select the Steps page.

    Click New to add a step containing the second job.

  • sandosh.star (8/1/2013)


    how to trigger a job after completion of another job in sql server management studio 2005

    I have two JOBS A and B in JOB Activity monitor

    I want to trigger JOB B automatically after completion of JOB A

    Add a step of type "Transact-SQL script (T-SQL)" to the end of Job A. In the "Command" window for that step, enter a statement that executes the sp_start_job system stored procedure for Job B. See here for info on sp_start_job:

    http://msdn.microsoft.com/en-us/library/ms186757(v=sql.90).aspx

    Jason Wolfkill

  • Assuming the account running "JobA" has the authority to start jobB, the command in JobA would be:

    EXEC msdb.dbo.sp_start_job 'JobB'

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply