Contents Index Send data from the consolidated database Replicate from the remote database to the consolidated database

SQL Remote User's Guide
  Tutorials for Adaptive Server Anywhere Users
    Start replicating data

Receive data at the remote database


To receive the insert statement at the remote database, you must run the Message Agent, dbremote, at the remote database.

To receive data at the remote database

  1. From a command prompt, change to your tutorial directory. For example,

    > c:
    > cd c:\tutorial
  2. Enter the following statement at the command line to run the Message Agent against the field database:

    dbremote -c "dbn=field;uid=dba;pwd=sql"

    This command line assumes that the field database is currently running on the default server.

    For more information on dbremote options, see The Message Agent.

  3. Click Shutdown on the Message Agent window to stop the Message Agent when the messages have been processed. The Message Agent window displays the message Execution completed when all processing is complete.

The Message Agent window displays status information while running. This information can be output to a log file for record keeping in a real setup. You will see that the Message Agent first receives a message from hq, and then sends a message. This return message contains confirmation of successful receipt of the replication update; such confirmations are part of the SQL Remote message tracking system that ensures message delivery even in the event of message system errors.

Verify that the data has arrived 

You should now connect to the remote field database using Interactive SQL, and inspect the SalesRep and Customer tables, to see which rows have been received.

To verify that the data has arrived

  1. Connect to the field database using Interactive SQL.

  2. Inspect the SalesRep table by executing the following statement:

    SELECT * FROM SalesRep

    You will see that the SalesRep table contains both rows entered at the consolidated database. This is because the SalesRepData publication included all the data from the SalesRep table.

  3. Inspect the Customer table by executing the following statement:

    SELECT * FROM Customer

    You will also see that the Customer table contains only row (Ocean Sports) entered at the consolidated database. This is because the SalesRepData publication included only those customers assigned to the subscribed Sales Rep.


Contents Index Send data from the consolidated database Replicate from the remote database to the consolidated database