EnumDistributionAgentViews Method (SQL-DMO)

The EnumDistributionAgentViews method returns a QueryResults object enumerating historical data for all Distribution Agents.

Applies To

Distributor Object

Syntax

object.EnumDistributionAgentViews() as QueryResults

Part Description
object Expression that evaluates to an object in the Applies To list

Returns

A QueryResults object containing one result set defined by these columns.

Column Data type Description
dbname nvarchar(129) Name of the database used for distribution.
name nvarchar(101) Name of the Distribution Agent.
status integer Agent status. Interpret by using SQLDMO_TASKSTATUS_TYPE.
publisher nvarchar(129) Publisher name.
publisher_db nvarchar(129) Name of database published.
publication nvarchar(129) Publication name.
subscriber nvarchar(129) Subscriber name.
subscriber_db nvarchar(129) Name of database storing replicated image.
subscription_type integer Type of subscription. Interpret by using SQLDMO_SUBSCRIPTION_TYPE.
start_time nvarchar(25) Date and time at which agent started.
time nvarchar(25) Date and time message logged.
duration integer Cumulative run time.
comments nvarchar(256) Descriptive text.
delivery_time integer Cumulative time spent delivering transactions.
delivered_transactions integer Cumulative number of transactions.
delivered_commands integer Cumulative number of commands.
average_commands integer Average number of commands.
delivery_rate integer Average number of commands per transaction delivered per second.
delivery_latency integer Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber.
error_id integer When nonzero, the Microsoft® SQL Server™ error message number of the most recent error.
job_id binary(22) Identifier of the SQL Server Agent job starting the replication agent.
local_job bit Reserved.
profile_id integer Profile identifier.
agent_id integer Agent identifier.
local_timestamp binary(14) Timestamp.

Remarks

In the result set, date and time data returned in start_time and time is formatted as YYYYMMDD hh:mm:ss.fff where: YYYY represents the year in four digits; MM represents the month in two digits (zero padded); DD represents the day of the month in two digits; hh represents the hour using two digits, a twenty-four hour clock and zero padding; mm represents the minute in two digits (zero padded); ss represents the second in two digits (zero padded); and fff represents the fractional part of the second in three digits.

Remarks

Use the EnumDistributionAgentViews method to monitor the Distribution Agent sessions.

Prototype (C/C++)

HRESULT EnumDistributionAgentViews(
LPSQLDMOQUERYRESULTS* ppResults);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.