ApplyToTargetServerGroup Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The ApplyToTargetServerGroup method adds one or more execution targets to the list of targets maintained for the referenced Microsoft SQL Server Agent job.
구문
object
.ApplyToTargetServerGroup(
str
)
Parts
- object
Expression that evaluates to an object in the Applies To list.
- str
String that specifies a single target server group by name.
Prototype (C/C++)
HRESULT ApplyToTargetServerGroup(
SQLDMO_LPCSTR NewValue);
주의
Before a SQL Server Agent job can execute, the job must have at least one step and an execution target. When a SQL Server Agent acts as a master server for multiserver administration servers, known execution target servers can be grouped for easier targeting of multiple servers at one time.
When using SQL Distributed Management Objects (SQL-DMO) to create, schedule, and run SQL Server Agent jobs, use either the ApplyToTargetServer or ApplyToTargetServerGroup method to add an execution target. Use the ApplyToTargetServer method when an instance of SQL Server will be specified as an execution target. Use the ApplyToTargetServerGroup method when targeting grouped target servers.
For more information about configuring target server groups by using SQL-DMO, see TargetServerGroup Object.