Chapter 4. Tutorialsfor Adaptive Server Anywhere Users
The
dbxtract
utilityenables you to carry out all the steps needed to create a
remotedatabase complete with subscriptions and required user IDs.
Extract the remote database information
Leavethe hq database running, and change to the tutorial directory.
Typethe following command at the system command line (all on one line) to
extracta 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. Thisis useful during
development.
Thiscommand assumes the hq database is currently running on the default
server.If the database is not running, you should enter a database file
parameterin the connection string:
dbf=hq.db
insteadof the dbndatabase name parameter.
Fordetails of the
dbxtract
utilityand its options, see “The extraction
utility”on page 303.
The
dbxtract
commandcreates a SQL command file named
reload.sql
inthe
currentdirectory and a data file in the
c:\tutorial
directory.It also starts the
subscriptionsto the remote user.
Thenext step is to load these files into the remote database.
Load the remote database information
Toload the database information
1. From the tutorial directory, connect to the remote database
field.db
from
InteractiveSQL with a user ID of DBA and a password of SQL.
2. Run the
reload.sql
commandfile:
READ C:\tutorial\reload.sql
The
reload.sql
commandfile carries out the following tasks:
Createsa message type at the remote database.
GrantsPUBLISH and REMOTE permissions to the remote and
consolidateddatabase, respectively.
45