Sybase DC38133-01-0902-01 Microscope & Magnifier User Manual


 
Chapter 5. A Tutorial for Adaptive Server Enterprise Users
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 create a subscription
1. Create a subscription to SalesRepData for field_user, with a
subscription value of rep1:
exec sp_subscription ’create’, SalesRepData, field_user,
’rep1’
go
At this 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
There are three stages to producing a remote Adaptive Server Anywhere
database:
Extract the schema and data into a set of files. You do this using the
ssxtract
utility.
Create an Adaptive Server Anywhere database.
Load the schema and data into the database.
Extracting the schema
and data
With all the information included, the next step is to extract an Adaptive
Server Anywhere database for user field_user. The following command line
(entered all 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
The options have the following meaning.
-v Verbose mode. For development work, this provides additional
output.
-c Connection string option. The connection string is supplied in double
quotes following the -c.
eng=server-name Specifies the server to which the extraction utility is
to connect.
dbn=hq Specifies the database on the server to use; in this case hq.
63