PublisherMonitor.EnumPublications2 Method
Returns additional information on publications at a monitored Publisher.
命名空间: Microsoft.SqlServer.Replication
程序集: Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)
语法
声明
Public Function EnumPublications2 As DataSet
public DataSet EnumPublications2 ()
public:
DataSet^ EnumPublications2 ()
public DataSet EnumPublications2 ()
public function EnumPublications2 () : DataSet
返回值
A DataSet object that contains the following columns.
Column |
Data type |
Description |
publisher_db |
Is the name of the Publisher. |
|
publication |
String |
Is the name of a publication. |
publication_type |
Is the type of publication, which can be one of the following values: 0 = Transactional publication 1 = Snapshot publication 2 = Merge publication |
|
status |
Int32 |
Maximum status of all Replication Agents associated with the publication, which can be one of the following values: 1 = Started 2 = Succeeded 3 = In progress 4 = Idle 5 = Retrying 6 = Failed |
warning |
Int32 |
Maximum threshold warning generated by a subscription belonging to the publication, which can be the logical OR result of one or more of the following values: 1 = Expiration. A subscription to a transactional publication has exceeded the retention period by more than the allowable threshold, as a percentage of the retention period. 2 = Latency. The time taken to replicate data from a transactional Publisher to the Subscriber exceeds the threshold, in seconds. 4 = Mergeexpiration. A subscription to a merge publication has exceeded the retention period by more than the allowable threshold, as a percentage of the retention period. 8 = Mergefastrunduration. The time taken to complete synchronization of a merge subscription exceeds the threshold over a fast network connection, in seconds. 16 = Mergeslowrunduration. The time taken to complete synchronization of a merge subscription exceeds the threshold over a slow or dial-up network connection, in seconds. 32 = Mergefastrunspeed. The delivery rate for rows during synchronization of a merge subscription has failed to maintain the threshold rate over a fast network connection, in rows per second. 64 = Mergeslowrunspeed. The delivery rate for rows during synchronization of a merge subscription has failed to maintain the threshold rate over a slow or dial-up network connection, in rows per second. |
worst_latency |
Int32 |
The highest latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication. |
best_latency |
Int32 |
The lowest latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication. |
average_latency |
Int32 |
The average latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication. |
last_distsync |
Is the last date/time that the Distribution Agent ran. |
|
retention |
Int32 |
Is the retention period for the publication. |
latencythreshold |
Int32 |
Is the latency threshold set for the transactional publication. |
expirationthreshold |
Int32 |
Is the expiration threshold set for the publication if it is a merge publication. |
agentnotrunningthreshold |
Int32 |
Is the threshold set for the longest time for an agent not to have run. |
subscriptioncount |
Int32 |
Is the number of subscriptions to a publication. |
runningdistagentcount |
Int32 |
Is the number of Distribution Agents running for the publication |
snapshot_agentname |
String |
Name of the Snapshot Agent job for the publication. |
logreader_agentname |
String |
Name of the Log Reader Agent job for the transactional publication. |
qreader_agentname |
String |
Name of the Queue Reader Agent job for an immediate updating transactional publication. |
worst_runspeedPerf |
Int32 |
Is the longest synchronization time for the merge publication. |
best_runspeedPerf |
Int32 |
Is the shortest synchronization time for the merge publication. |
average_runspeedPerf |
Int32 |
Is the average synchronization time for the merge publication. |
retention_period_unit |
Int32 |
Is the unit used to express retention. |
备注
Commit any property changes to the PublisherMonitor object before calling this method because properties of this object may need to be loaded if they have not been loaded already.
The EnumPublications2 method can only be called by members of the db_owner or replmonitor fixed database roles on the distribution database.
Calling EnumPublications2 is equivalent to executing sp_replmonitorhelppublication (Transact-SQL).
This namespace, class, or member is supported only in version 2.0 of the .NET Framework.
线程安全
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.
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
PublisherMonitor Class
PublisherMonitor Members
Microsoft.SqlServer.Replication Namespace
其他资源
How to: Programmatically Monitor Replication (RMO Programming)