DistributionDatabase.CleanUpAnonymousSubscription Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
member this.CleanUpAnonymousSubscription : int * Microsoft.SqlServer.Replication.PublicationType -> unit
Public Sub CleanUpAnonymousSubscription (agentId As Integer, publicationType As PublicationType)
Parameters
- 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.