Contents Index Receive data at the remote database Principles of SQL Remote Design

SQL Remote User's Guide
  A Tutorial for Adaptive Server Enterprise Users
    Start replicating data

Replicate from the remote database to the consolidated database


You should now try entering data at the remote database and sending it to the consolidated database. Only the outlines are presented here.

To replicate data from the remote database to the consolidated database

  1. Connect to the field database from Interactive SQL.

  2. INSERT a row at the remote database. For example

    INSERT INTO Customer (cust_key, name, rep_key)
    VALUES ('cust3', 'North Land Trading', 'rep1')
  3. COMMIT the row.

    COMMIT;
  4. With the field.db database running, run dbremote to send the message to the consolidated database.

    dbremote -c "eng=field;dbn=field;uid=DBA;pwd=SQL"
  5. Run ssremote to receive the message at the consolidated database:

    ssremote -c "eng=server-name;dbn=hq;uid=sa;pwd=sysadmin"
  6. Connect to the consolidated database and display the Customer table. This now has three rows:

    SELECT *
    FROM Customer
    cust_key name rep_key
    cust1 Ocean Sports rep1
    cust2 Sports Plus rep2
    cust3 North Land Trading rep1

In this simple example, there is no protection against duplicate entries of primary key values. SQL Remote does provide for such protection. For information, see the chapters on SQL Remote Design.


Contents Index Receive data at the remote database Principles of SQL Remote Design