Tutorial: Adaptive Server Anywhere replication using Interactive SQL and dbxtract

The following sections are a tutorial describing how to set up a simple SQL Remote replication system for users who prefer to use command-line tools or who want to know what Sybase Central is doing behind the scenes.

This tutorial describes the SQL statements for managing SQL Remote, which can be run from Interactive SQL. It also describes how to run the dbxtract command-line utility to extract remote databases from a consolidated database.

In this tutorial you act as the DBA of the consolidated database, and set up a simple replication system using the file-sharing message link. The simple example is 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 database and one remote database. You can install this example on one computer.

Preparing for the replication tutorial

This section describes the steps you need to take to prepare for the tutorial.

These steps include the following:

Create the directories and databases required for the tutorial.

Add a table to the consolidated database.

To create 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:ntutorial

2.The tutorial uses two databases: a consolidated database named hq.db and a remote database named field.db . Change to the tutorial directory and create 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 command prompt:

40

Page 58
Image 58
Sybase DC38133-01-0902-01 Preparing for the replication tutorial, To create the databases and directories for the tutorial