The TargetServers collection contains TargetServer objects referencing multiserver administration TSX servers.
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 have a unique list of target (TSX) servers.
A SQL Server Agent job execution target can be:
For any MSX server, TSX servers enlist or defect in the list of targets available for the MSX server. When a TSX enlists at an MSX, a TargetServer object referencing the TSX is added to the TargetServers collection of the JobServer object referencing the MSX server. When a TSX server defects, the TargetServer object referencing the TSX server will be removed from the TargetServers collection when the collection is refreshed. For more information, see MSXEnlist Method and MSXDefect Method.
When using the Item method, the TargetServers collection supports member identification using either name or ordinal reference syntax. For example:
Set oTargetServer = oJobServer.TargetServers("LONDON1")
Or:
Set oTargetServer = oJobServer.TargetServers(1)
Item Method | Refresh Method |
ItemByID Method | Remove Method (Collections) |