Contents Index Create the publication and subscription Start replicating data

SQL Remote User's Guide
  A Tutorial for Adaptive Server Enterprise Users
    Tutorial: Adaptive Server Enterprise replication
      Setting up the consolidated database

Extract the remote database

There are three stages to producing a remote Adaptive Server Anywhere database:

Extracting the schema and data 

With all the information included, the next step is to extract an Adaptive Server Anywhere database for user field_user. The following command line (entered all on one line, from the tutorial directory) carries out this procedure:

ssxtract -v -c "eng=server-name; dbn=hq;uid=sa;pwd=sysadmin" C:\tutorial\field field_user

The options have the following meaning.

For more information on extraction utility options, see The extraction utility.

Running this command produces the following files:

Creating an Adaptive Server Anywhere database 

You can create an Adaptive Server Anywhere database using the dbinit utility. A simple Adaptive Server Anywhere database is a file, unlike Adaptive Server Enterprise databases.

You should create the Adaptive Server Anywhere database so that it is compatible with Adaptive Server Enterprise database behavior, unless you have set options in your Adaptive Server Enterprise server that are different from the default.

To create a database file named field.db

Loading the data into the database 

You can load the data into the database using the Adaptive Server Anywhere Interactive SQL utility or the rtsql utility. rtsql is an alternative to Interactive SQL for batch processes only, and is provided for the runtime database.

To load the data into the database using Interactive SQL

  1. Start an Adaptive Server Anywhere server running on the field database:

    dbeng9 field.db
  2. Connect to the server using the Interactive SQL utility:

    dbisql -c "eng=field;dbn=field;uid=DBA;pwd=SQL"

    The user ID and password must be entered in upper case, as the Adaptive Server Anywhere database was created as case-sensitive.

  3. Load the data using the READ command:

    READ C:\TUTORIAL\RELOAD.SQL

To load the data into the database as a batch process

  1. Start an Adaptive Server Anywhere server running on the field database:

    dbeng9 field.db
  2. Run the script from Interactive SQL:

    dbisql -c "eng=field;dbn=field;uid=DBA;pwd=SQL" reload.sql

    The user ID and password must be entered in upper case, as the Adaptive Server Anywhere database was created as case-sensitive.

What next? 

The system is now ready for replication.

For the next step, inserting and replicating data, see the section Start replicating data.


Contents Index Create the publication and subscription Start replicating data