Share via


PublisherMonitor.EnumDatabasePublications Method

Returns information about publications that use a specified publication database.

Namespace: Microsoft.SqlServer.Replication
Assembly: Microsoft.SqlServer.Rmo (in microsoft.sqlserver.rmo.dll)

Syntax

'Declaration
Public Function EnumDatabasePublications ( _
    publicationDatabase As String _
) As DataSet
public DataSet EnumDatabasePublications (
    string publicationDatabase
)
public:
DataSet^ EnumDatabasePublications (
    String^ publicationDatabase
)
public DataSet EnumDatabasePublications (
    String publicationDatabase
)
public function EnumDatabasePublications (
    publicationDatabase : String
) : DataSet

Parameters

  • publicationDatabase

Return Value

A DataSet object that has the following columns.

Column name

Data type

Description

publisher_db

sysname

Is the name of the Publisher.

publication

sysname

Is the name of a publication.

publication_type

int

Is the type of publication, which can be one of these values.

0 = Transactional publication

1 = Snapshot publication

2 = Merge publication

status

int

Maximum status of all replication agents associated with the publication, which can be one of these values.

1 = Started

2 = Succeeded

3 = In progress

4 = Idle

5 = Retrying

6 = Failed

warning

int

Maximum threshold warning generated by a subscription belonging to the publication, which can be the logical OR result of one or more of these values.

1 = expiration – a subscription to a transactional publication has not been synchronized within the retention period threshold.

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 not been synchronized within the retention period threshold.

8 = mergefastrunduration - the time taken to complete synchronization of a merge subscription exceeds the threshold, in seconds, over a fast network connection.

16 = mergeslowrunduration - the time taken to complete synchronization of a merge subscription exceeds the threshold, in seconds, over a slow or dial-up network connection.

32 = mergefastrunspeed – the delivery rate for rows during synchronization of a merge subscription has failed to maintain the threshold rate, in rows per second, over a fast network connection.

64 = mergeslowrunspeed – the delivery rate for rows during synchronization of a merge subscription has failed to maintain the threshold rate, in rows per second, over a slow or dial-up network connection.

worst_latency

int

The highest latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication.

best_latency

int

The lowest latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication.

average_latency

int

The average latency, in seconds, for data changes propagated by the Log Reader or Distribution Agents for a transactional publication.

last_distsync

datetime

Is the last date and time that the Distribution Agent ran.

retention

int

Is the retention period for the publication.

latencythreshold

int

Is the latency threshold set for the transactional publication.

expirationthreshold

int

Is the expiration threshold set for the publication if it is a merge publication.

agentnotrunningthreshold

int

Is the threshold set for the longest time for an agent not to have run.

subscriptioncount

int

Is the number of subscriptions to a publication.

runningdistagentcount

int

Is the number of distribution agents running for the publication.

snapshot_agentname

sysname

Name of the Snapshot Agent job for the publication.

logreader_agentname

sysname

Name of the Log Reader Agent job for the transactional publication.

qreader_agentname

sysname

Name of the Queue Reader Agent job for a transactional publication that supports queued updating.

worst_runspeedPerf

int

Is the longest synchronization time for the merge publication.

best_runspeedPerf

int

Is the shortest synchronization time for the merge publication.

average_runspeedPerf

int

Is the average synchronization time for the merge publication.

retention_period_unit

int

Is the unit used to express retention.

Remarks

The EnumDatabasePublications method can only be called by members of the db_owner or replmonitor fixed database roles on the distribution database.

Calling EnumDatabasePublications is equivalent to executing sp_replmonitorhelppublication.

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.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

PublisherMonitor Class
PublisherMonitor Members
Microsoft.SqlServer.Replication Namespace