Condividi tramite


PublicationMonitor.EnumSubscriptions Method

Returns information on subscriptions that are subscribed to the monitored publication.

Spazio dei nomi: Microsoft.SqlServer.Replication
Assembly : Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)

Sintassi

'Dichiarazione
Public Function EnumSubscriptions As DataSet
public DataSet EnumSubscriptions ()
public:
DataSet^ EnumSubscriptions ()
public DataSet EnumSubscriptions ()
public function EnumSubscriptions () : DataSet

Valore restituito

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) 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

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.

ms150167.note(it-it,SQL.90).gifNota:

Remote agent activation has been discontinued. For more information, see Funzionalità non più utilizzate nella replica di SQL Server 2005.

offload_server

Boolean

Name of the server used with remote agent activation.

ms150167.note(it-it,SQL.90).gifNota:

Remote agent activation has been discontinued. For more information, see Funzionalità non più utilizzate nella replica di SQL Server 2005.

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) 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

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.

ms150167.note(it-it,SQL.90).gifNota:

Remote agent activation has been discontinued. For more information, see Funzionalità non più utilizzate nella replica di SQL Server 2005.

offload_server

Boolean

Name of the server used with remote agent activation.

ms150167.note(it-it,SQL.90).gifNota:

Remote agent activation has been discontinued. For more information, see Funzionalità non più utilizzate nella replica di SQL Server 2005.

subscriber_type

Int32

The data source type at the Subscriber:

0 = SQL Server Subscriber

1 = Open Database Connectivity (ODBC) data source

Osservazioni

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.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

PublicationMonitor Class
PublicationMonitor Members
Microsoft.SqlServer.Replication Namespace

Altre risorse

How to: Programmatically Monitor Replication (RMO Programming)