Contents IndexSet up the consolidated database Start replicating data

User's Guide
   Part III. Using SQL Anywhere
     Chapter 27. Introduction to SQL Remote Replication
      Set up the remote database

The remote database needs to be configured in order to send and receive messages and participate in a SQL Remote setup. Like the consolidated database, the remote database needs a CURRENT PUBLISHER to identify the source of outgoing messages, and it needs to have the consolidated database identified as a subscriber. The remote database also needs the publication to be created and needs a subscription created for the consolidated database. The remote database also needs to be synchronized with the consolidated database; that is, it needs to have a current copy of the data in order for the replication to start.

The DBXTRACT utility enables you to carry out all the steps needed to create a remote database complete with subscriptions and required user IDs.

Top of page


Extract the remote database information

Leave the hq database running, and type the following command at the system command line (all on one line) to extract a database for the user remote from the consolidated database:

dbxtract -c "dbn=hq;uid=dba;pwd=sql" c:\tutorial field_user

In Windows 3.x, you should run the following command either from File>.Run in Program Manager or from an icon:

dbxtracw -c "dbn=hq;uid=dba;pwd=sql" c:\tutorial field_user

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

     dbf=c:\tutorial\hq.db

instead of the dbn database name parameter. For details of the DBXTRACT utility and its options, see "The DBXTRACT command-line utility".

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.

Top of page


Load the remote database information

To load the database information, connect to the remote database FIELD.DB from ISQL as user ID DBA and password SQL.

You can do this by typing CONNECT in the ISQL command window, and then entering DBA, SQL, and the database file C:\TUTORIAL\FIELD.DB in the connection dialog box.

Once connected, run the RELOAD.SQL command file:

READ c:\tutorial\reload.sql

The RELOAD.SQL command file carries out the following tasks:

While connected to the field database as DBA and confirm that the table is created by typing

     SELECT * FROM news.

The system is now ready to start replicating data.

Top of page


Contents IndexSet up the consolidated database Start replicating data