Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to create a job targeting multiple servers? Expand / Collapse
Author
Message
Posted Tuesday, July 29, 2014 12:52 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 2:21 PM
Points: 451, Visits: 1,432
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
Post #1597459
Posted Wednesday, July 30, 2014 3:49 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 8:14 AM
Points: 71, Visits: 220
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.
Post #1597634
Posted Wednesday, July 30, 2014 11:43 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 11:26 PM
Points: 3,214, Visits: 2,336
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."
Post #1597879
Posted Wednesday, July 30, 2014 3:02 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, September 17, 2014 8:14 AM
Points: 71, Visits: 220
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.
Post #1597994
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse