Chapter 18. Command Reference for Adaptive Server Enterprise

 

 

 

 

sp_subscription procedure

 

 

Purpose

To manage subscriptions.

 

 

Syntax

sp_subscription operation,

 

 

 

publication_name,

 

 

 

 

 

user_name,

 

 

 

 

 

[ subscribe_by ]

 

 

 

 

 

Argument

 

Description

 

 

 

 

 

 

 

 

operation

 

The operation to be performed. This must be one of the

 

 

 

following:

 

 

 

 

 

create

To create a subscription to a given publica-

 

 

 

tion for a user.

 

 

 

drop

To drop a subscription to a given publication

 

 

 

for a user.

 

 

 

start

To start a subscription to the named publica-

 

 

 

tion.

 

 

 

 

 

stop

To stop a subscription to the named publica-

 

 

 

tion.

 

 

 

 

 

synchronize To synchronize a subscription to the

 

 

 

named publication.

 

publication_name

 

The name of the publication to which the subscription

 

 

 

refers.

 

 

 

user_name

 

The user ID who is being subscribed to the publication.

 

subscribe_by

 

The subscription value.

 

 

 

 

 

 

See also Description

Example

“Creating subscriptions” on page 181 .

The sp_subscription procedure is used to manage subscriptions. The first argument to the procedure (operation) specified whether the procedure is being created, dropped, started, stopped, or synchronized.

In general, starting and synchronizing subscriptions is done using the extraction utility.

The following statement creates a subscription for user SalesRep1 to the SalesRepData publication, which has no subscription expression.

sp_subscription create, SalesRepData, SalesRep1

go

433

Page 451
Image 451
Sybase DC38133-01-0902-01 manual Spsubscription procedure