다음을 통해 공유


AddAlternatePublisher Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The AddAlternatePublisher method adds a server to a list of alternate Publishers. Subscribers to a publication can synchronize with listed alternate Publishers.

구문

object
.AddAlternatePublisher(
szAlternatePublisher 
,
szAlternatePublicationDB 
,
szAlternatePublication 
, 
[ szAlternateDistributor ] , 
[ szFriendlyName ] )

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • szAlternatePublisher
    String that specifies the name of the alternate Publisher.
  • szAlternatePublicationDB
    String that specifies the name of the publication database.
  • szAlternatePublication
    String that specifies the name of the publication.
  • szAlternateDistributor
    String that specifies the name of the Distributor for the alternate Publisher.
  • szFriendlyName
    String that specifies a description for the alternate Publisher.

Prototype (C/C++)

HRESULT AddAlternatePublisher(
SQLDMO_LPCSTR pszAlternatePublisher, 
SQLDMO_LPCSTR pszAlternatePublicationDB, 
SQLDMO_LPCSTR pszAlternatePublication, 
SQLDMO_LPCSTR pszAlternateDistributor, 
SQLDMO_LPCSTR pszFriendlyName);

주의

Use the AddAlternatePublisher method to add a server to a list of alternate Publishers to which Subscribers can synchronize. The list is stored at both the Publisher and Subscriber. A Subscriber can run the EnumAlternatePublishers method to obtain a list of enabled alternate Publishers and potential alternate Publishers. Subscribers can then synchronize with any listed enabled alternate Publisher.

Use the RemoveAlternatePublisher method to remove a server from the list of alternate Publishers.

[!참고] If an application calls AddAlternatePublisher 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" are returned.

Applies to:

MergePublication2 Object

참고 항목

참조

AllowSyncToAlternate Property
EnumAlternatePublishers Method
RemoveAlternatePublisher Method

도움말 및 정보

SQL Server 2005 지원 받기