Freigeben über


EnumTargetServers Method

Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The EnumTargetServers method returns a QueryResults object that enumerates the execution targets of the referenced Microsoft SQL Server Agent job.

Syntax

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.

Hinweise

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.

Applies To: