Método EnumSubscriptions
Returns information on subscriptions that are subscribed to the monitored publication.
Namespace: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Rmo (em Microsoft.SqlServer.Rmo.dll)
Sintaxe
'Declaração
Public Function EnumSubscriptions As DataSet
'Uso
Dim instance As PublicationMonitor
Dim returnValue As DataSet
returnValue = instance.EnumSubscriptions()
public DataSet EnumSubscriptions()
public:
DataSet^ EnumSubscriptions()
member EnumSubscriptions : unit -> DataSet
public function EnumSubscriptions() : DataSet
Valor de retorno
Tipo: System.Data. . :: . .DataSet
A DataSet object.
For a transactional or snapshot publication, the DataSet contains the following columns.
Column |
Data type |
Description |
---|---|---|
subscriber |
Is the name of the Subscriber. |
|
status |
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 |
Is the name of the subscription database. |
|
type |
Is the subscription type, which can be one of the following values: 0 = Push 1 = Pull 2 = Anonymous |
|
distribution_agent |
Is the name of the Distribution Agent job. |
|
last_action |
Message text of the last action logged by the agent. |
|
action_time |
Date and time of the last action logged by the agent. |
|
start_time |
Date and time of last agent execution. |
|
duration |
Elapsed time of the session, in seconds. |
|
delivery_rate |
Average number of commands delivered per second. |
|
delivery_latency |
Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber. |
|
delivered_transactions |
Total number of transactions delivered in the session. |
|
delivered_commands |
Total number of commands delivered in the session. |
|
delivery_time |
Date and time that the session was logged. |
|
average_commands |
Average number of commands per transaction delivered in the session. |
|
error_id |
The ID of the error in the MSrepl_errors (Transact-SQL) system table. Use the EnumErrorRecords 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 |
When true, the agent job is available at the Distributor. |
|
profile_id |
Profile identifier. |
|
agent_id |
Agent job identifier. |
|
local_timestamp |
Byte[8] |
Timestamp of the most recent agent run. |
offload_enabled |
If true, the subscription supports remote agent activation.
Observação
Remote agent activation has been discontinued. For more information, see Funcionalidade descontinuada na Replicação do SQL Server.
|
|
offload_server |
Name of the server used with remote agent activation.
Observação
Remote agent activation has been discontinued. For more information, see Funcionalidade descontinuada na Replicação do SQL Server.
|
|
subscriber_type |
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 |
Is the name of the Subscriber. |
|
status |
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 |
Is the name of the subscription database. |
|
type |
Is the subscription type, which can be one of the following values: 0 = Push 1 = Pull 2 = Anonymous |
|
agent_name |
Is the name of the Merge Agent job. |
|
last_action |
Message text of the last action logged by the agent. |
|
action_time |
Date and time of the last action logged by the agent. |
|
start_time |
Date and time of last agent execution. |
|
duration |
Elapsed time of the session, in seconds. |
|
delivery_rate |
Average number of commands delivered per second. |
|
download_inserts |
The number of inserts applied at the Subscriber. |
|
download_updates |
The number of updates applied at the Subscriber. |
|
download_deletes |
The number of deletes applied at the Subscriber. |
|
publisher_conflicts |
The number of conflicts that occurred while applying changes at the Subscriber. |
|
upload_inserts |
The number of inserts applied at the Publisher. |
|
upload_updates |
The number of updates applied at the Publisher. |
|
upload_deletes |
The number of deletes applied at the Publisher. |
|
subscriber_conflicts |
The number of conflicts that occurred while applying changes at the Publisher. |
|
error_id |
The ID of the error in the MSrepl_errors (Transact-SQL) system table. Use the EnumErrorRecords 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 |
When true, the agent job is available at the Distributor. |
|
profile_id |
Profile identifier. |
|
agent_id |
Agent job identifier. |
|
last_timestamp |
Byte[8] |
Timestamp of the most recent agent run. |
offload_enabled |
If true, the subscription supports remote agent activation.
Observação
Remote agent activation has been discontinued. For more information, see Funcionalidade descontinuada na Replicação do SQL Server.
|
|
offload_server |
Name of the server used with remote agent activation.
Observação
Remote agent activation has been discontinued. For more information, see Funcionalidade descontinuada na Replicação do SQL Server.
|
|
subscriber_type |
The data source type at the Subscriber: 0 = SQL Server Subscriber 1 = Open Database Connectivity (ODBC) data source |
Comentários
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.
The EnumSubscriptions method is available only with SQL Server 2005.
This namespace, class, or member is supported only in version 2.0 of the .NET Framework.
Consulte também