How to create a job targeting multiple servers?

  • I need to create a job that would run like this:

    Step1 -- server A

    Step2 -- server B

    Step3 -- server A

    Step4 -- server B

    In Job properties, there is nothing suitable besides [Uncategorized (Local)].

    At the Target page, there is only one option available - Target local server.

    Am I doing something wrong or missing something?

    Thanks

  • As far as I'm aware there isn't any built-in way of running multiple job steps against different servers.

    Depending on what the jobs steps are doing there are ways to emulate this...

    For example you could use SQLCMD to call a batch file that would then start a job on the remote servers that performs the function for that task.

    Create a linked server on the server the jobs would run from and use this in the job step commands. (Not ideal depending on size of tables involved and what you're doing)

    Using a powershell script that connects the remote server(s) and executes the command.

    I'm sure there's probably other ways but these are the ones I could think of off the top of my head. Personally I've used the 1st method before.

  • This can be done - it's called multi-server administration

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

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

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • This doesn't operate at the job step level though, MultiServer administration is at the job level. So you set the target server for the job and not the individual job steps.

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

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