DistributionDatabase.CleanUpAnonymousSubscription(Int32, PublicationType) DistributionDatabase.CleanUpAnonymousSubscription(Int32, PublicationType) Method

Definition

Removes metadata for anonymous subscriptions at the Distributor.

public:
 void CleanUpAnonymousSubscription(int agentId, Microsoft::SqlServer::Replication::PublicationType publicationType);
public void CleanUpAnonymousSubscription (int agentId, Microsoft.SqlServer.Replication.PublicationType publicationType);
Parameters
agentId
Int32 Int32

An Int32 value that specifies the agent ID value.

publicationType
PublicationType PublicationType

A PublicationType object value that specifies the publication type.

Remarks

Use the CleanUpAnonymousSubscription method to remove the metadata for anonymous subscriptions that have expired or that no longer exist. Otherwise, this metadata may be returned by Replication Monitor. You can also use the ExcludeAnonymousSubscriptions property to prevent anonymous subscription information from being returned. For more information, see Monitoring Replication.

The CleanUpAnonymousSubscription method can only be called by members of the db_owner fixed database role on the distribution database.

Applies to