How to execute a job from a job

  • I don't if this is the right forum for this question but here is my question.

    I want to execute a job from a already scheduled job i.e. in the already scheduled job I want to add another step that will call a job. I don't know if this is possible, but if it is possible can some body help.

     

    Thanks

     

  • Check out sp_start_job in SQL Server Books Online:

    sp_start_job

    Instructs SQL Server Agent to execute a job immediately.

     

  • Just put this in a job step:

    exec msdb.sp_start_job @job_name = 'jobname'

    Greg

    Greg

  • This is how I had to do it.

    It definetely works!!!!

    USE msdb

    EXEC sp_start_job @job_name = 'SHRINK TRANS-LOG SAS3800'

     

    Regards

    Marcelo Miorelli

     

Viewing 4 posts - 1 through 3 (of 3 total)

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