Chapter 18. Command Referencefor Adaptive Server Enterprise
sp_subscription procedure
Purpose Tomanage subscriptions.
Syntax sp_subscription operation,
publication_name,
user_name,
[subscribe_by ]
Argument Description
operation
Theoperation to be performed. Thismust be one of the
following:
create Tocreate a subscription to a given publica-
tionfor a user.
drop Todrop a subscription to a given publication
fora user.
start Tostart a subscription to the named publica-
tion.
stop Tostop a subscription to the named publica-
tion.
synchronize Tosynchronize a subscription to the
namedpublication.
publication_name
The name of the publication to which the subscription
refers.
user_name
Theuser ID who is being subscribed to the publication.
subscribe_by
Thesubscription value.
Seealso “Creatingsubscriptions” on page 181.
Description The sp_subscription procedure is used to manage subscriptions. The first
argumentto the procedure (

operation

)specified whether the procedure is
beingcreated, dropped, started, stopped, or synchronized.
Ingeneral, starting and synchronizing subscriptions is done using the
extractionutility.
Example Thefollowing statement creates a subscription for user SalesRep1 to the
SalesRepDatapublication, which has no subscription expression.
sp_subscription create,
SalesRepData,
SalesRep1
go
433