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. Inspectthe Customer table by typing the following statement:
SELECT *FROM Customer
Youwill see that the Customer table contains only one 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. Only the outlines are presented here.
To replicate data from the remote database to the consolidated
database
1. Connectto 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. COMMITthe row.
COMMIT;
4. Withthe
field.db
databaserunning, run
dbremote
tosend the message to
theconsolidated database.
dbremote -c "eng=field;dbn=field;uid=DBA;pwd=SQL"
5. Run
ssremote
toreceive 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.
Thisnow has three rows:
SELECT *
FROM Customer
68