DistributionDatabase.CleanUpAnonymousSubscription 方法
Removes metadata for anonymous subscriptions at the Distributor.
命名空間: Microsoft.SqlServer.Replication
組件: Microsoft.SqlServer.Rmo (在 Microsoft.SqlServer.Rmo.dll 中)
語法
'宣告
Public Sub CleanUpAnonymousSubscription ( _
agentId As Integer, _
publicationType As PublicationType _
)
'用途
Dim instance As DistributionDatabase
Dim agentId As Integer
Dim publicationType As PublicationType
instance.CleanUpAnonymousSubscription(agentId, _
publicationType)
public void CleanUpAnonymousSubscription(
int agentId,
PublicationType publicationType
)
public:
void CleanUpAnonymousSubscription(
int agentId,
PublicationType publicationType
)
member CleanUpAnonymousSubscription :
agentId:int *
publicationType:PublicationType -> unit
public function CleanUpAnonymousSubscription(
agentId : int,
publicationType : PublicationType
)
參數
- agentId
型別:System.Int32
An Int32 value that specifies the agent ID value.
- publicationType
型別:Microsoft.SqlServer.Replication.PublicationType
A PublicationType object value that specifies the publication type.
備註
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 監視複寫.
The CleanUpAnonymousSubscription method can only be called by members of the db_owner fixed database role on the distribution database.