Creates a new subscription for a specified publication.
sp_addsub sub_name, pub_name, conn_name
is the name of the new subscription.
is the name of the publication to which the new subscription subscribes.
is the name of a replicate database connection. Connection names must be specified in the form ds.db, where:
ds is the name of the data server on which the replicate database resides.
db is the name of the replicate database.
sp_addsub subdoc, pubdoc, "boulder.doc"
Creates a new subscription named subdoc to the publication pubdoc, for the replicate connection to the database doc on the data server boulder.
Before you invoke sp_addsub, you must suspend the database connection using sp_suspendreplicateconn. After the subscription is created, you can resume the database connection with sp_resumereplicateconn.
The single quote (or apostrophe) character is not allowed in a subscription name. For example, the subscription name sub’s is not allowed.
To subscribe to a primary object, after you create a subscription, you must create at least one replicate article in that subscription with sp_addreplicateart.
When the requested action occurs successfully, no results are returned.
When an error occurs, an error message is returned.
sp_addpub, sp_addreplicateart, sp_addreplicateconn, sp_helpreplicateart, sp_helpreplicateconn, sp_helpsub