The EnumMergeAgentViews method returns a QueryResults object enumerating execution state for all replication merge publication agents.
object.EnumMergeAgentViews() as QueryResults
| Part | Description |
|---|---|
| object | Expression that evaluates to an object in the Applies To list |
A QueryResults object containing one result set defined by these columns.
| Column | Data type | Description |
|---|---|---|
| dbname | nvarchar(129) | Distribution database name. |
| name | nvarchar(101) | Merge Agent name. |
| status | integer | Agent status. Interpret by using SQLDMO_TASKSTATUS_TYPE. |
| publisher | nvarchar(129) | Publisher name. |
| publisher_db | nvarchar(129) | Name of published database. |
| publication | nvarchar(129) | Publication name. |
| subscriber | nvarchar(129) | Subscriber name. |
| subscriber_db | nvarchar(129) | Name of database implementing the subscription. |
| subscription_type | integer | Direction of subscription (push or pull) interpreted by using SQLDMO_ SUBSCRIPTION_TYPE. |
| start_time | nvarchar(25) | Date and time at which agent session started. |
| time | nvarchar(25) | Date and time of last session log. |
| duration | integer | Elapsed time of the logged session activity. |
| comments | nvarchar(256) | Descriptive text. |
| delivery_rate | integer | Average number of transactions 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 conflicts 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_conflicts | 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. |
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.
HRESULT EnumMergeAgentViews(
LPSQLDMOQUERYRESULTS* ppResults);