Subscribe Method

SQLServer.RemoteServer Object

Description

Subscribes to a publication on a remote server.

Visual Basic

RemoteServer.Subscribe (
[DatabaseName :=] idPubDatabase,
[PublicationName :=] idPublication,
[[ArticleName :=] idArticle,]
[[SubscribingDB :=] idSubDatabase,]
[[SyncType :=] tSync] )

C++

HRESULT pRemoteServer->Subscribe (
SQLOLE_LPCSTR
idPubDatabase,
SQLOLE_LPCSTR
idPublication,
SQLOLE_LPCSTR
idArticle = NULL,
SQLOLE_LPCSTR
idSubDatabase = NULL,
SQLOLE_SUBSYNC_TYPE
tSync = SQLOLESubSync_Auto );

Elements

Element Type Description

idPubDatabase Identifier Database on the remote server that is publishing the article.
idPublication Identifier Publication that contains the article.
idArticle Identifier Article to subscribe to. Default is all articles.
idSubDatabase Identifier Destination database on the local server that is subscribing to the article. Default is the same database as idPubDatabase.
tSync SQLOLE_SUBSYNC_TYPE Synchronization type.

Reference

sp_subscribe