To subscribe a user to a publication, you need the following information:
User name The user who is being subscribed to the publication. This user must have been granted REMOTE permission.
Publication name The name of the publication to which the user is being subscribed.
Subscription value The subscription value only applies if your publication includes a SUBSCRIBE BY clause. The subscription value is the value that is tested against the SUBSCRIBE BY clause of the publication. For example, if a publication has the name of a column containing an employee ID as a SUBCRIBE BY clause, the value of the employee ID of the subscribing user must be provided when the subscription is created. The subscription value is always a string.
This value is only needed when the publication has a SUBSCRIBE BY clause. See Publish only some rows using the SUBSCRIBE BY clause.
Connect to the database as a user with DBA authority.
In the left pane, select the Publications folder.
Select a publication.
In the right pane, click the SQL Remote Subscriptions tab.
From the File menu choose New » SQL Remote Subscription.
Follow the instructions in the Create SQL Remote Subscription Wizard.
The details of the subscription are different depending on whether the publication uses a subscription expression.
Connect to the database as a user with DBA authority.
Execute a CREATE SUBSCRIPTION statement to subscribe a user to a publication.
For example, the following statement creates a subscription for user name SamS to the CustomerPub publication, which was created using a WHERE clause:
CREATE SUBSCRIPTION TO CustomerPub FOR SamS; |
For example, the following statement creates a subscription for user name SamS to the PubOrders publication, defined with a subscription expression SalesRepresentative, requesting the rows for Sam Singer's own sales:
CREATE SUBSCRIPTION TO PubOrders ( '856' ) FOR SamS; |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |