Contents Index START LOGGING statement [Interactive SQL] START SYNCHRONIZATION DELETE statement [MobiLink]

ASA SQL Reference
  SQL Statements

START SUBSCRIPTION statement [SQL Remote]


Description 

Use this statement to start a subscription for a user to a publication.

Syntax 

START SUBSCRIPTION
TO publication-name [ ( subscription-value ) ]
FOR subscriber-id, ...

Parameters 

publication-name    The name of the publication to which the user is being subscribed. This may include the owner of the publication.

subscription-value    A string that is compared to the subscription expression of the publication. The value is required here because each subscriber may have more than one subscription to a publication.

subscriber-id    The user ID of the subscriber to the publication. This user must have a subscription to the publication.

Usage 

A SQL Remote subscription is said to be started when publication updates are being sent from the consolidated database to the remote database.

The START SUBSCRIPTION statement is one of a set of statements that manage subscriptions. The CREATE SUBSCRIPTION statement defines the data that the subscriber is to receive. The SYNCHRONIZE SUBSCRIPTION statement ensures that the consolidated and remote databases are consistent with each other. The START SUBSCRIPTION statement is required to start messages being sent to the subscriber.

Data at each end of the subscription must be consistent before a subscription is started. It is recommended that you use the database extraction utility to manage the creation, synchronization, and starting of subscriptions. If you use the database extraction utility, you do not need to execute an explicit START SUBSCRIPTION statement. Also, the Message Agent starts subscriptions once they are synchronized.

Permissions 

Must have DBA authority.

Side effects 

Automatic commit.

See also 

CREATE SUBSCRIPTION statement [SQL Remote]

REMOTE RESET statement [SQL Remote]

SYNCHRONIZE SUBSCRIPTION statement [SQL Remote]

sp_subscription procedure

Standards and compatibility 
Example 

The following statement starts the subscription of user SamS to the pub_contact publication.

START SUBSCRIPTION TO pub_contact
FOR SamS

Contents Index START LOGGING statement [Interactive SQL] START SYNCHRONIZATION DELETE statement [MobiLink]