Chapter 5. A Tutorialfor Adaptive Server Enterprise Users
Adda subscr iption Eachuser ID that is to receive changes to a publication must have a
subscriptionto that publication. Subscriptionscan only be created for a
validremote user. You need to add a subscription to the SalesRepData
publicationfor the remote database user field_user.
Tocreate a subscription
1. Create a subscription to SalesRepData for field_user, with a
subscriptionvalue of rep1:
exec sp_subscription ’create’, SalesRepData, field_user,
’rep1’
go
Atthis stage, the subscription is not started—that is, no data will be
exchanged. The subscription is started by the database extraction utility.
Extract the remote database
Thereare three stages to producing a remote Adaptive Server Anywhere
database:
Extractthe schema and data into a set of files. Youdo this using the
ssxtract
utility.
Createan AdaptiveServer Anywhere database.
Loadthe schema and data into the database.
Extractingthe schema
anddata Withall the information included, the next step is to extract an Adaptive
ServerAnywhere database for user field_user. Thefollowing command line
(enteredall on one line, from the tutorial directory) carries out this
procedure:
ssxtract -v -c "eng=server-name; dbn=hq;uid=sa;pwd=sysadmin" C:\
tutorial\field field_user
Theoptions have the following meaning.
-v Verbosemode. For development work, this provides additional
output.
-c Connectionstring option. Theconnection string is supplied in double
quotesfollowing the -c.
eng=server-name Specifiesthe server to which the extraction utility is
toconnect.
dbn=hq Specifiesthe database on the server to use; in this case hq.
63