EnumTargetServers Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The EnumTargetServers method returns a QueryResults object that enumerates the execution targets of the referenced Microsoft SQL Server Agent job.
구문
object
.EnumTargetServers( )
as
QueryResults
Parts
- object
Expression that evaluates to an object in the Applies To list.
Prototype (C/C++)
HRESULT EnumTargetServers(
LPSQLDMOQUERYRESULTS* ppResults);
Returns
A QueryResults object that contains one result set defined by these columns.
Column |
Data type |
Description |
---|---|---|
enlist_date |
smalldatetime |
When applicable, date and time at which the target server enlisted in the multiserver administration group. |
last_outcome_/message |
nvarchar(1025) |
SQL Server message raised in response to last execution. |
last_poll_date |
smalldatetime |
When applicable, most recent date and time at which the target server polled the master server for new instructions. |
last_run_date |
integer |
When nonzero, date on which execution occurred formatted as described in Remarks. |
last_run_duration |
integer |
When nonzero, execution duration expressed as a number of seconds. |
last_run_outcome |
tinyint |
Execution outcome interpreted using SQLDMO_JOBOUTCOME_TYPE. |
last_run_time |
integer |
When nonzero, time at which execution occurred formatted as described in Remarks. |
server_id |
integer |
System-generated identifier of a target server. |
server_name |
nvarchar(31) |
Network name of the server running Microsoft SQL Server. |
주의
The result set column last_run_date represents the execution date as a scaled long integer. The integer is built as a sum of the year scaled by 10000, the month scaled by 100, and the day. For example, the date April 19, 1997 is represented by the long integer value 19970419.
The result set column last_run_time represents execution time as a scaled long integer. The integer is built as a sum of the hour scaled by 10000, the minute scaled by 100, and the seconds. The value uses a 24-hour clock. For example, the time 1:03:09 P.M. is represented by the long integer value 130309.