SQL Remote User's Guide
SQL Remote Design for Adaptive Server Anywhere
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 expression.
To create and manage subscriptions in Sybase Central
In the left pane, open the Publications folder.
Select the desired publication. You can perform the following tasks in Sybase Central:
In the right pane, click the SQL Remote Subscriptions tab. You can configure the appropriate settings as follows:
To subscribe a remote user to the publication, from the File menu choose New
To unsubscribe a remote user, right-click the user in the Subscribers list and choose Delete from the popup menu.
To manually start, stop, or synchronize subscriptions, select the user in the Subscribers list and choose Properties from the popup menu.
Click the Advanced tab. On this tab, click Start Now to start subscriptions, Stop Now to stop subscriptions, or Synchronize Now to synchronize subscriptions.
The subscriptions are affected as soon as you click the button. Subsequently clicking Cancel on the property sheet does not cancel your start/stop/synchronize action.
To subscribe a user to a publication, if that publication has no subscription expression, you need the following information:
User ID The user who is being subscribed to the publication. This user must have been granted remote permissions.
Publication name The name of the publication to which the user is being subscribed.
The following statement creates a subscription for a user ID SamS to the pub_orders_samuel_singer publication, which was created using a WHERE clause:
CREATE SUBSCRIPTION TO pub_orders_samuel_singer FOR SamS
To subscribe a user to a publication, if that publication does have a subscription expression, you need the following information:
User ID The user who is being subscribed to the publication. This user must have been granted remote permissions.
Publication name The name of the publication to which the user is being subscribed.
Subscription value The value that is to be tested against the subscription expression of the publication. For example, if a publication has the name of a column containing an employee ID as a subscription expression, the value of the employee ID of the subscribing user must be provided in the subscription. The subscription value is always a string.
The following statement creates a subscription for Samuel Singer (user ID SamS, employee ID 856) to the pub_orders publication, defined with a subscription expression sales_rep, requesting the rows for Samuel Singer's own sales:
CREATE SUBSCRIPTION TO pub_orders ( '856' ) FOR SamS
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.
For more information, see CREATE SUBSCRIPTION statement.