how to start a remote job?

  • I need to start a job on a remote sql server after i finish some steps in my local sql server job.

    Is it possible to do this without using linked servers? and how?

    Thanks

  • Use SQLCMD in a job step on the local server using the operating system type for the step.

    SQLCMD -E -S REMOTESERVER -Q "msdb..sp_start_job 'RemoteJob'"

  • Edoggs method should work

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Another option is to use SSIS and kick off the job through SSIS - use connection managers for each different server and kick off the jobs from there.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • CirquedeSQLeil (9/16/2010)


    Another option is to use SSIS and kick off the job through SSIS - use connection managers for each different server and kick off the jobs from there.

    Where we get this option in JOb properties?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • you need to create the linked server first with your remote server and then you can specify in your job step as :-

    use msdb

    go

    exec linkedservername.msdb.dbo.sp_start_job

    @job_name = your job name'

    ,@server_name='remote server which you configred in linked server'

    ----------
    Ashish

  • Bhuvnesh (9/17/2010)


    CirquedeSQLeil (9/16/2010)


    Another option is to use SSIS and kick off the job through SSIS - use connection managers for each different server and kick off the jobs from there.

    Where we get this option in JOb properties?

    If you create an ssis package, you can create an execute SQL task that executes the task. The option is not in job properties, you would have to setup a processing flow within your ssis package and execute the package as a whole from the job.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • All good suggestions. ultimately you cannot start a remote job from your local SQL Server instance without opening a connection on the other instance. Your instance has no control over the SQL Agent on the other server. You make a connection (linked server, SSIS, SQLCMD, etc.) and then "ask" the other Agent to run the job.

Viewing 8 posts - 1 through 7 (of 7 total)

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