Tutorial: Adaptive Server Anywhere replicationusing Interactive SQL and dbxtract
Thefollowing sections are a tutorial describing how to set up a simple
SQLRemote replication system for users who prefer to use command-line
toolsor who want to know what Sybase Central is doing behind the scenes.
Thistutorial describes the SQL statements for managing SQL Remote,
whichcan be run from Interactive SQL. It also describes how to run the
dbxtract
command-lineutility to extract remote databases from a
consolidateddatabase.
Inthis tutorial you act as the DBA of the consolidated database, and set up a
simplereplication system using the file-sharing message link. Thesimple
exampleis a primitive model for a sales-force automation system, with two
tables. One contains a list of sales representatives, and another a list of
customers. The tables are replicated in a setup with one consolidated
databaseand one remote database. Youcan install this example on one
computer.

Preparing for the replication tutorial

Thissection describes the steps you need to take to prepare for the tutorial.
Thesesteps include the following:
Createthe directories and databases required for the tutorial.
Adda table to the consolidated database.
Tocreate the databases and directories for the tutorial
1. Create a directory to hold the files you make during this tutorial; for
example
c:\tutorial
.
mkdir c:\tutorial
2. The tutorial uses two databases: aconsolidated database named
hq.db
anda remote database named
field.db
. Change to the tutorial directory
andcreate these databases using the following statements at a command
prompt:
dbinit hq.db
dbinit field.db
3. Create a subdirectory for each of the two user IDs in the replication
system. Create these subdirectories using the following statements at a
commandprompt:
40