The TargetServerGroups collection contains TargetServerGroup objects classifying lists of multiserver administration TSX servers referenced by the TargetServers collection.
A SQL Server Agent job has an execution target. With Microsoft® SQL Server™ version 7.0, the SQL Server Agent of one server can direct job execution on other servers running SQL Server within an organization. A server directing job execution is a master (MSX) server. Each MSX server in an organization can maintain and organize lists of target (TSX) servers, called target server groups.
A SQL Server Agent job execution target can be:
With the TargetServerGroups collection, you can:
To create a target server group
To remove a target server group
oJobServer.TargetServerGroups.Remove("[Seattle_TSX]")
When using the Item or Remove method, the TargetServerGroups collection supports member identification using either name or ordinal reference syntax. For example:
Set oTargetServerGroup = oJobServer.TargetServerGroups("London_TSX")
Or:
Set oTargetServerGroup = oJobServer.TargetServerGroups(2)
Add Method | Refresh Method |
Item Method | Remove Method (Collections) |
ItemByID Method |