Job.EnumTargetServers Method
Enumerates a list of execution target servers that have been assigned to the referenced job.
네임스페이스: Microsoft.SqlServer.Management.Smo.Agent
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Function EnumTargetServers As DataTable
public DataTable EnumTargetServers ()
public:
DataTable^ EnumTargetServers ()
public DataTable EnumTargetServers ()
public function EnumTargetServers () : DataTable
반환 값
A DataTable object value that contains a list of execution target servers and information about the referenced job when it is run on the target servers. The table describes the different columns of the returned DataTable.
Column |
Data type |
Description |
Name |
String |
The name of the instance of Microsoft SQL Server that is a target server. |
ID |
Int32 |
The ID value of the target server. |
LastRunOutcome |
Int32 |
The numeric value that specifies the way in which the job finishes on the target server that is listed in the CompletionAction enumeration. |
LastRunOutcomeMessage |
String |
The message that was recorded with the last completion of the job on the target server. |
LastRunDate |
DateTime |
The date and time when the job was last run on the target server. |
LastRunDuration |
Int32 |
The time it took to complete when the job was last run on the target server, in seconds. |
EnlistDate |
DateTime |
The date and time when the target server was enlisted. |
LastPollDate |
DateTime |
The date and time when the target server last polled the master server for any outstanding jobs to be executed. |
주의
이 네임스페이스, 클래스 또는 멤버는 Microsoft .NET Framework 2.0 버전에서만 지원됩니다.
예
How to: Create a Job with Steps and a Schedule in Visual Basic .NET
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
Job Class
Job Members
Microsoft.SqlServer.Management.Smo.Agent Namespace
관련 자료
Scheduling Automatic Administrative Tasks in SQL Server Agent
관리 작업 자동화(SQL Server 에이전트)
sp_help_targetserver(Transact-SQL)