Поделиться через


RemoveDefunctAnonymousSubscription Method

В будущей версии Microsoft SQL Server эта возможность будет удалена. Избегайте использования этой возможности в новых разработках и запланируйте изменение существующих приложений, в которых она применяется.

The RemoveDefunctAnonymousSubscription method removes a defunct anonymous subscription agent entry from the Distributor.

Синтаксис

Object
.RemoveDefunctAnonymousSubscription(
bstrDistributionDBName , 
lAgentID , 
ReplType)

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • bstrDistributionDBName
    String that specifies the distribution database name.

  • lAgentID
    Long integer that identifies the agent for anonymous subscription.

  • ReplType
    Long integer that specifies a replication method.

Prototype (C/C++)

HRESULT RemoveDefunctAnonymousSubscription(
SQLDMO_LPCSTR pszDistributionDBName, 
long lAgentID, 
SQLDMO_REPLICATION_TYPE ReplType);

Settings

Set ReplType by using these SQLDMO_REPLICATION_TYPE values.

Constant

Value

Description

SQLDMORepType_Merge

2

Merge replication.

SQLDMORepType_Transactional

1

Transactional or snapshot replication.

Замечания

An anonymous subscription becomes defunct when dropped by the Subscriber. If the Subscriber is not connected to the Distributor when the subscription is dropped, agent metadata still remains at the Distributor. An application can call RemoveDefunctAnonymousSubscription to clean up the metadata.

ПримечаниеПримечание

If an application calls RemoveDefunctAnonymousSubscription on an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.

Applies To: