PublicationMonitor Class

Definition

监视发布。Monitors a publication.

public ref class PublicationMonitor sealed : Microsoft::SqlServer::Replication::ReplicationObject
public sealed class PublicationMonitor : Microsoft.SqlServer.Replication.ReplicationObject
type PublicationMonitor = class
    inherit ReplicationObject
Public NotInheritable Class PublicationMonitor
Inherits ReplicationObject
Inheritance
PublicationMonitor

Remarks

如果未为复制配置指定的分发服务器、分发数据库和发布服务器,则会引发异常。An exception will be thrown if the specified Distributor, distribution database, and Publisher are not configured for replication.

PublicationMonitor需要连接到分发服务器。PublicationMonitor requires a connection to the Distributor.

线程安全性Thread Safety

此类型的任何公共静态( Shared 在 Microsoft Visual Basic)成员对于多线程操作是安全的。Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. 但不保证所有实例成员都是线程安全的。Any instance members are not guaranteed to be thread safe.

Constructors

PublicationMonitor()

创建 PublicationMonitor 类的新实例。Creates a new instance of the PublicationMonitor class.

PublicationMonitor(String, String, String, String, ServerConnection)

使用指定的名称、分发数据库、发布服务器、发布数据库和与分发服务器的连接创建 PublicationMonitor 类的新实例。Creates a new instance of the PublicationMonitor class with the specified name, distribution database, Publisher, publication database, and connection to the Distributor.

Properties

CachePropertyChanges

获取或设置是缓存对复制属性所做的更改还是立即应用它们。Gets or sets whether to cache changes made to the replication properties or to apply them immediately.

(Inherited from ReplicationObject)
CacheRefreshPolicy

获取或设置监视缓存刷新策略。Gets or sets the monitor cache refresh policy.

ConnectionContext

获取或设置与 Microsoft SQL Server 实例的连接。Gets or sets the connection to an instance of Microsoft SQL Server.

(Inherited from ReplicationObject)
Description

获取发布的文本说明。Gets the textual description of the publication.

DistributionDBName

获取发布使用的分发数据库的名称。Gets the name of the distribution database used by the publication.

ExcludeAnonymousSubscriptions

获取或设置在监视结果中是排除还是包括匿名订阅。Gets or sets whether anonymous subscriptions are excluded from or included in the monitor results.

IsExistingObject

获取服务器上是否存在该对象。Gets whether the object exists on the server or not.

(Inherited from ReplicationObject)
Name

获取或设置监视的发布的名称。Gets or sets the name of the monitored publication.

PublicationDBName

获取或设置发布数据库的名称。Gets or sets the name of the publication database.

PublisherName

获取或设置发布服务器的名称。Gets or sets the name of the Publisher.

QueueReaderAgentName

获取队列读取器代理名称。Gets the queue reader agent name.

SqlServerName

获取此对象连接到的 Microsoft SQL Server 实例的名称。Gets the name of the Microsoft SQL Server instance to which this object is connected.

(Inherited from ReplicationObject)
Status

获取发布的状态。Gets the status of the publication.

StatusAndWarning

获取分发服务器上引用的发布的状态和警告,包括该发布的所有关联的代理。Gets the status and warnings of the referenced publication on the Distributor, including all of the agents associated for the publication.

Type

获取该发布参与的复制的类型。Gets the type of replication in which the publication participates.

UserData

获取或设置允许用户将他们自己的数据附加到该对象的对象属性。Gets or sets an object property that allows users to attach their own data to the object.

(Inherited from ReplicationObject)

Methods

ChangeMonitorThreshold(Int32, Boolean, Int32, Int32)

更改发布的监视阈值标准。Changes the monitoring threshold metric for a publication.

CheckValidCreation()

检查有效复制创建。Checks the valid replication creation.

(Inherited from ReplicationObject)
CheckValidDefinition(Boolean)

指示定义是否有效。Indicates whether the definition is valid.

(Inherited from ReplicationObject)
CleanUpTracerTokenHistory(DateTime)

从使用事务复制发布的数据库中删除早于指定日期的跟踪令牌的所有元数据。Removes all metadata for tracer tokens older than the specified date from a database published using transactional replication.

CleanUpTracerTokenHistory(Int32)

从使用事务复制发布的数据库中删除特定跟踪令牌的元数据。Removes metadata for a specific tracer token from a database published using transactional replication.

CommitPropertyChanges()

将所有缓存的属性更改语句发送到 Microsoft SQL Server 的实例。Sends all the cached property change statements to the instance of Microsoft SQL Server.

(Inherited from ReplicationObject)
Decouple()

将引用的复制对象与服务器相分离。Decouples the referenced replication object from the server.

(Inherited from ReplicationObject)
EnumErrorRecords(Int32)

返回与同步会话过程中所发生的指定错误 ID 相关联的错误的相关信息。Returns information about errors associated with a specified error ID that occurred during a synchronization session.

EnumLogReaderAgent()

为监视的发布使用的日志读取器代理作业返回信息。Returns information for the Log Reader Agent job used by the monitored publication.

EnumMonitorThresholds()

返回为此发布定义的复制监视器阈值。Returns the replication monitor thresholds defined for this publication.

EnumQueueReaderAgent()

为监视的发布使用的队列读取器代理作业返回信息。Returns information for the Queue Reader Agent job used by the monitored publication.

EnumSnapshotAgent()

为监视的发布使用的快照代理作业返回信息。Returns information for the Snapshot Agent job used by the monitored publication.

EnumSubscriptions()

返回订阅监视的发布的订阅的有关信息。Returns information on subscriptions that are subscribed to the monitored publication.

EnumSubscriptions2(SubscriptionResultOption)

返回有关订阅监视的发布的订阅的附加信息。Returns additional information on subscriptions that are subscribed to the monitored publication.

EnumTracerTokenHistory(Int32)

为插入到监视的事务发布的单个跟踪令牌记录返回订阅服务器滞后时间信息。Returns Subscriber latency information for a single tracer token record inserted into a monitored transactional publication.

EnumTracerTokens()

返回已插入到监视的事务发布中的所有跟踪令牌。Returns all tracer tokens that have been inserted into the monitored transactional publication.

GetChangeCommand(StringBuilder, String, String)

从复制返回更改命令。Returns the change command from the replication.

(Inherited from ReplicationObject)
GetCreateCommand(StringBuilder, Boolean, ScriptOptions)

从复制返回创建命令。Returns the create command from the replication.

(Inherited from ReplicationObject)
GetDropCommand(StringBuilder, Boolean)

从复制返回删除命令。Returns the drop command from the replication.

(Inherited from ReplicationObject)
InternalRefresh(Boolean)

从复制启动内部刷新。Initiates an internal refresh from the replication.

(Inherited from ReplicationObject)
Load()

从服务器加载现有对象的属性。Loads the properties of an existing object from the server.

(Inherited from ReplicationObject)
LoadProperties()

从服务器加载现有对象的属性。Loads the properties of an existing object from the server.

(Inherited from ReplicationObject)
Refresh()

重新加载该对象的属性。Reloads the properties of the object.

(Inherited from ReplicationObject)
TransPendingCommandInfo(String, String, SubscriptionOption)

返回与订阅的挂起命令有关的信息。Returns information about pending commands for a subscription.

Applies to

See also