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 typing the following statement:

SELECT * FROM Customer

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

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

68

Page 86
Image 86
Sybase DC38133-01-0902-01 manual Commit the row