Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to create a job targeting multiple servers?


How to create a job targeting multiple servers?

Author
Message
SQL Guy 1
SQL Guy  1
SSChasing Mays
SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)SSChasing Mays (633 reputation)

Group: General Forum Members
Points: 633 Visits: 2443
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
MrG78
MrG78
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 356
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.
Rudyx - the Doctor
Rudyx - the Doctor
Hall of Fame
Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)Hall of Fame (3.3K reputation)

Group: General Forum Members
Points: 3290 Visits: 2476
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

Regards
Rudy Komacsar
Senior Database Administrator

"Ave Caesar! - Morituri te salutamus."
MrG78
MrG78
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 356
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search