5.

Select Customer from the list of Available Tables. Click Add.

 

6.

On the SUBSCRIBE BY Restrictions tab, select the Customer table and

 

 

enter the expression rep_key.

 

7.

Click Finish to create the publication.

Add a subscription

Each user ID that is to receive changes to a publication must have a

 

subscription to that publication. Subscriptions can only be created for a

 

valid remote user. You need to add a subscription to the SalesRepData

 

publication for the remote database user field_user .

To add a subscription

1.Open the Publications folder and select the SalesRepData publication in the left pane.

2.Click the SQL Remote Subscriptions tab in the right pane.

3.From the File menu, choose New SQL Remote Subscription. The SQL Remote Subscription Creation wizard appears.

4.Choose to subscribe field_user . Enter a Subscription value of rep1 and click Finish.

The subscription value is an expression that matches the Subscribe By expression in the publication. In a later step, the field_user user ID is assigned a rep_key value of rep1.

You have now set up the consolidated database.

Set up the remote database in Sybase Central

The remote database needs to be created and configured in order to send and receive messages and participate in a SQL Remote setup.

Like the consolidated database, the remote database needs a publisher (in this case, the field_user user ID) to identify the source of outgoing messages, and it needs to have hq_user identified as a user with consolidated permissions. It needs the SalesRepData publication to be created and needs a subscription created for the hq_user user ID.

The remote database also needs to be synchronized with the consolidated database; that is, it needs to have a current copy of the data in order for the replication to start. In this case, there is no data in the publication as yet.

The database extraction utility enables you to carry out all the steps needed to create a remote database complete with subscriptions and required user IDs.

38

Page 56
Image 56
Sybase DC38133-01-0902-01 Set up the remote database in Sybase Central, Enter the expression repkey, To add a subscription