Chapter 4. Tutorialsfor Adaptive Server Anywhere Users
TheMessage Agent window displays status information while running. This
informationcan be output to a log file for record keeping in a real setup. You
willsee that the Message Agent first receives a message from hq, and then
sendsa message. Thisreturn message contains confirmation of successful
receiptof the replication update; such confirmations are part of the
SQLRemote message tracking system that ensures message delivery even in
theevent of message system errors.
Verifythat the data has
arrived Youshould now connect to the remote field database using Interactive SQL,
andinspect the SalesRep and Customer tables, to see which rows have been
received.
Toverify 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
Youwill see that the SalesRep table contains both rows entered at the
consolidateddatabase. Thisis because the SalesRepData publication
includedall the data from the SalesRep table.
3. Inspect the Customer table by executing the following statement:
SELECT *FROM Customer
Youwill also see that the Customer table contains only row (Ocean
Sports)entered at the consolidated database. Thisis because the
SalesRepDatapublication included only those customers assigned to the
subscribedSales Rep.
Replicate from the remote database to the consolidated database
Youshould now try entering data at the remote database and sending it to the
consolidateddatabase. Onlythe 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 by executing the following statement:
INSERT INTO Customer (cust_key, name, rep_key)
VALUES (’cust3’, ’North Land Trading’, ’rep1’)
3. Commit the insertion by executing the following statement::
49