Chapter 4. Tutorialsfor Adaptive Server Anywhere Users
Start replicating data
Younow have a replication system in place. In this section, data is replicated
fromthe consolidated database to the remote database, and from the remote
tothe consolidated database.

Enter data at the consolidated database

First,enter some data into the consolidated database.
Toenter data at the consolidated database
1. Connect to the consolidated database hq from the Interactive SQL utility
witha user ID of DBA and a password of SQL.
2. Insert tworows into the SalesRep table and commit the insertion by
executingthe following statement:
INSERT INTO SalesRep (rep_key, name)
VALUES (’rep1’, ’Field User’) ;
INSERT INTO SalesRep (rep_key, name)
VALUES (’rep2’, ’Another User’) ;
COMMIT ;
3. Insert tworows into the Customer table and commit the insertion by
executingthe following statement:
INSERT INTO Customer (cust_key, name, rep_key)
VALUES (’cust1’, ’Ocean Sports’, ’rep1’ ) ;
INSERT INTO Customer (cust_key, name, rep_key)
VALUES (’cust2’, ’Sports Plus’, ’rep2’ ) ;
COMMIT ;
4. Confirm that the data has been entered by executing the following
statements:
SELECT *
FROM SalesRep;
SELECT *
FROM Customer;
Thenext step is to send the relevant rows to the remote database.

Send data from the consolidated database

Tosend the rows to the remote database, you must run the Message Agent at
theconsolidated database. The
dbremote
programis the Message Agent for
AdaptiveServer Anywhere.
47