TargetServer Object

SQL-DMO

SQL-DMO
Methods
Refresh Method
Remarks

A SQL Server Agent job has an execution target. For an instance of 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. Servers can enlist in the domain specified by a master SQL Server Agent. When a server enlists in a domain, it becomes a target server for job execution managed by the master SQL Server Agent.

Any instance on which SQL Server Agent is executing provides the local instance as a valid target for job execution.

Target servers are defined only on a master SQL Server Agent, and the SQL-DMO TargetServers collection and each TargetServer object are populated only when SQL-DMO applications connect to an instance of SQL Server identified as the master in a multiserver administration group.

With the TargetServer object, you can:

  • Report the properties of a server that is an existing target in a multiserver administration group.

  • Set the location string for a server that is an existing target in a multiserver administration group.