Sybase SQL Remote DC38133-01-0902-01 User Manual

Page of 485
Chapter 4. Tutorials for Adaptive Server Anywhere Users
The
dbxtract utility enables you to carry out all the steps needed to create a
remote database complete with subscriptions and required user IDs.
Extract the remote database information
Leave the hq database running, and change to the tutorial directory.
Type the following command at the system command line (all on one line) to
extract a database for the user field_user from the consolidated database:
dbxtract -v -c "dbn=hq;uid=dba;pwd=sql" c:
\
tutorial field_user
The
-v
option produces more verbose output. This is useful during
development.
This command assumes the hq database is currently running on the default
server. If the database is not running, you should enter a database file
parameter in the connection string:
dbf=hq.db
instead of the dbn database name parameter.
For details of the
dbxtract utility and its options, see
The
dbxtract command creates a SQL command file named reload.sql in the
current directory and a data file in the
c:\tutorial directory. It also starts the
subscriptions to the remote user.
The next step is to load these files into the remote database.
Load the remote database information
To load the database information
1. From the tutorial directory, connect to the remote database
field.db from
Interactive SQL with a user ID of DBA and a password of SQL.
2. Run the
reload.sql command file:
READ C:
\
tutorial
\
reload.sql
The
reload.sql command file carries out the following tasks:
Creates a message type at the remote database.
Grants PUBLISH and REMOTE permissions to the remote and
consolidated database, respectively.
45