Collection Contents Index Ensuring unique primary keys PART 3.  SQL Remote Administration pdf/chap8.pdf

Data Replication with SQL Remote
   PART 2. Replication Design for SQL Remote
     CHAPTER 8. SQL Remote Design for Adaptive Server Enterprise       

Creating subscriptions


To subscribe to a publication, each subscriber must be granted REMOTE permissions and a subscription must also be created for that user. The details of the subscription are different depending on whether or not the publication uses a subscription column.

Subscriptions with no subscription column 

To subscribe a user to a publication, if that publication has no subscription column, you need the following information:

The following statement creates a subscription for a user ID SamS to the pub_orders_samuel_singer publication, which was created without using a subscription column:

sp_subscription 'create',
   'pub_orders_samuel_singer',
   'SamS'

Subscriptions with a subscription column 

To subscribe a user to a publication, if that publication does have a subscription column, you need the following information:

The following statement creates a subscription for Samuel Singer (user ID SamS, employee ID 856) to the pub_orders publication, defined with a subscription column sales_rep, requesting the rows for Samuel Singer's own sales:

sp_subscription create,
   pub_orders,
   SamS,
   '856'

Starting a subscription 

In order to receive and apply updates properly, each subscriber needs to have an initial copy of the data. The synchronization process is discussed in Synchronizing databases.


Collection Contents Index Ensuring unique primary keys PART 3.  SQL Remote Administration pdf/chap8.pdf