EnumSnapshotAgentViews Method (SQL-DMO)

The EnumSnapshotAgentViews method returns a QueryResults object enumerating historical data for all Snapshot Agents.

Applies To

Distributor Object

Syntax

object.EnumSnapshotAgentViews() 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.
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.
delivered_transactions integer Cumulative number of transactions.
delivered_commands integer Cumulative number of commands.
delivery_rate float Average number of commands delivered per second.
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.

Prototype (C/C++)

HRESULT EnumSnapshotAgentViews(
LPSQLDMOQUERYRESULTS* ppResults);

  


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