EnumSubscriptionViews Method (SQL-DMO)

The EnumSubscriptionViews method returns a QueryResults object enumerating subscription execution status information maintained at a Distributor.

Applies To

DistributionPublication Object

Syntax

object.EnumSubscriptionViews() as QueryResults

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

Returns

When the DistributionPublication object references a merge replication publication, a QueryResults object containing one result set defined by these columns.

Column Data type Description
subscriber nvarchar(129) Name of subscribing data source.
status integer Agent status. Interpret by using SQLDMO_TASKSTATUS_TYPE.
subscriber_db nvarchar(129) Name of the subscribed database at the Subscriber.
type integer Direction of subscription (push or pull) interpreted by using SQLDMO_
SUBSCRIPTION_TYPE.
agent_name nvarchar(101) Name of the replication agent.
last_action nvarchar(256) Descriptive text.
action_time nvarchar(25) Date and time of execution for most recent subscription action.
start_time nvarchar(25) Date and time at which agent session started.
duration integer Elapsed time of the logged session activity.
delivery_rate integer Average number of rows delivered per second.
publisher_insertcount integer Number of inserts at the Publisher.
publisher_updatecount integer Number of updates at the Publisher.
publisher_deletecount integer Number of deletes at the Publisher.
publisher_conflicts integer Number of deletes at the Publisher.
subscriber_insertcount integer Number of inserts at the Subscriber.
subscriber_
updatecount
integer Number of updates at the Subscriber.
subscriber_deletecount integer Number of deletes at the Subscriber.
subscriber_conficts integer Number of conflicts at 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 When True, the SQL Server Agent job executes at the Distributor. When False, the SQL Server Agent job executes at the Subscriber.
profile_id integer Profile identifier.
agent_id integer Agent identifier.
local_timestamp binary(14) Timestamp.

When the DistributionPublication object references a transactional or snapshot replication publication, a QueryResults object containing one result set defined by these columns.

Column Data type Description
subscriber nvarchar(129) Name of subscribing data source.
status integer Agent status. Interpret by using SQLDMO_TASKSTATUS_TYPE.
subscriber_db nvarchar(129) Name of the subscribed database at the Subscriber.
type tinyint Subscription direction. Interpret the value by using SQLDMO_
SUBSCRIPTION_TYPE.
distribution_agent nvarchar(101) Name of the replication agent.
last_action nvarchar(256) Descriptive text.
action_time nvarchar(25) Date and time of execution for most recent subscription action.
start_time nvarchar(25) Date and time at which agent session started.
duration integer Elapsed time of the logged session activity.
delivery_rate integer Average number of commands delivered per second.
delivery_latency integer Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber.
delivered_transactions integer Cumulative number of transactions.
delivered_commands integer Cumulative number of commands.
delivery_time integer Cumulative time spent delivering transactions.
average_commands integer Average number of commands per transaction.
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 When True, the SQL Server Agent job executes at the Distributor. When False, the SQL Server Agent job executes at the Subscriber.
profile_id integer Profile identifier.
agent_id integer Agent identifier.
last_timestamp binary(14) Timestamp.

Remarks

In the result set, date and time data returned in action_time and start_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 EnumSubscriptionViews(
LPSQLDMOQUERYRESULTS* ppResults);

  


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