PublicationMonitor.EnumSubscriptions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns information on subscriptions that are subscribed to the monitored publication.
public:
System::Data::DataSet ^ EnumSubscriptions();
public System.Data.DataSet EnumSubscriptions ();
member this.EnumSubscriptions : unit -> System.Data.DataSet
Public Function EnumSubscriptions () As DataSet
Returns
A DataSet object.
For a transactional or snapshot publication, the DataSet contains the following columns.
Column | Data type | Description |
---|---|---|
subscriber | String | Is the name of the Subscriber. |
status | Int32 | Status of agent job for the subscription, which can be one of these values:
1 = Started 2 = Succeeded 3 = In progress 4 = Idle 5 = Retrying 6 = Failed |
subscriber_db | String | Is the name of the subscription database. |
type | Int32 | Is the subscription type, which can be one of the following values:
0 = Push 1 = Pull 2 = Anonymous |
distribution_agent | String | Is the name of the Distribution Agent job. |
last_action | String | Message text of the last action logged by the agent. |
action_time | String | Date and time of the last action logged by the agent. |
start_time | String | Date and time of last agent execution. |
duration | Int32 | Elapsed time of the session, in seconds. |
delivery_rate | Single | Average number of commands delivered per second. |
delivery_latency | Int32 | Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber. |
delivered_transactions | Int32 | Total number of transactions delivered in the session. |
delivered_commands | Int32 | Total number of commands delivered in the session. |
delivery_time | String | Date and time that the session was logged. |
average_commands | Int32 | Average number of commands per transaction delivered in the session. |
error_id | Int32 | The ID of the error in the [MSrepl_errors (Transact-SQL)](http://msdn.microsoft.com/library/c6e023c1-2c32-4269-8d76-e442ea309e4b) system table. Use the EnumErrorRecords(Int32) method to return detailed information about an error. |
job_id | Byte **[16]** | Identifier of the SQL Server Agent job starting the Replication Agent. |
local_job | Boolean | When true , the agent job is available at the Distributor.
|
profile_id | Int32 | Profile identifier. |
agent_id | Int32 | Agent job identifier. |
local_timestamp | Byte **[8]** | Timestamp of the most recent agent run. |
offload_enabled | Boolean | If true , the subscription supports remote agent activation.
|
offload_server | Boolean | Name of the server used with remote agent activation. |
subscriber_type | Int32 | The data source type at the Subscriber:
0 = SQL Server Subscriber. 1 = Open Database Connectivity (ODBC) data source. |
For a merge publication, the DataSet contains the following columns.
Column | Data type | Description |
---|---|---|
subscriber | String | Is the name of the Subscriber. |
status | Int32 | Status of agent job for the subscription, which can be one of these values:
1 = Started 2 = Succeeded 3 = In progress 4 = Idle 5 = Retrying 6 = Failed |
subscriber_db | String | Is the name of the subscription database. |
type | Int32 | Is the subscription type, which can be one of the following values:
0 = Push 1 = Pull 2 = Anonymous |
agent_name | String | Is the name of the Merge Agent job. |
last_action | String | Message text of the last action logged by the agent. |
action_time | String | Date and time of the last action logged by the agent. |
start_time | String | Date and time of last agent execution. |
duration | Int32 | Elapsed time of the session, in seconds. |
delivery_rate | Single | Average number of commands delivered per second. |
download_inserts | Int32 | The number of inserts applied at the Subscriber. |
download_updates | Int32 | The number of updates applied at the Subscriber. |
download_deletes | Int32 | The number of deletes applied at the Subscriber. |
publisher_conflicts | Int32 | The number of conflicts that occurred while applying changes at the Subscriber. |
upload_inserts | Int32 | The number of inserts applied at the Publisher. |
upload_updates | Int32 | The number of updates applied at the Publisher. |
upload_deletes | Int32 | The number of deletes applied at the Publisher. |
subscriber_conflicts | Int32 | The number of conflicts that occurred while applying changes at the Publisher. |
error_id | Int32 | The ID of the error in the [MSrepl_errors (Transact-SQL)](http://msdn.microsoft.com/library/c6e023c1-2c32-4269-8d76-e442ea309e4b) system table. Use the EnumErrorRecords(Int32) method to return detailed information about an error. |
job_id | Byte **[16]** | Identifier of the SQL Server Agent job starting the replication agent. |
local_job | Boolean | When true , the agent job is available at the Distributor.
|
profile_id | Int32 | Profile identifier. |
agent_id | Int32 | Agent job identifier. |
last_timestamp | Byte **[8]** | Timestamp of the most recent agent run. |
offload_enabled | Boolean | If true , the subscription supports remote agent activation.
|
offload_server | Boolean | Name of the server used with remote agent activation. |
subscriber_type | Int32 | The data source type at the Subscriber:
0 = SQL Server Subscriber 1 = Open Database Connectivity (ODBC) data source |
Remarks
The ExcludeAnonymousSubscriptions property is used to filter the result set.
The EnumSubscriptions method can only be called by members of the db_owner or replmonitor fixed database roles on the distribution database.