To test the example

1.Create the tables and the procedure in the consolidated database, and add them as conflict resolution objects to the Customer table.

2.Insert and commit a change at the consolidated database. For example:

UPDATE Customer

SET name = ’Sea Sports’ WHERE cust_key=’cust1’ go

COMMIT go

3.Insert and commit a different change to the same line at the remote database. For example:

UPDATE Customer

SET name = ’C Sports’ WHERE cust_key=’cust1’ go

COMMIT go

4.Replicate the change from the remote to the consolidated database, by running the Message Agent at the remote database to send the message, and then at the consolidated database to receive and apply the message.

5.At the consolidated database, view the Customer table and the ConflictLog table. The Customer table contains the value from the remote database:

cust_key

name

rep_key

 

 

 

cust1

C Sports

rep1

 

 

 

The ConflictLog table has a single row, showing the conflict:

conflict_key

lost_name

won_name

 

 

 

1

Sea Sports

C Sports

 

 

 

A second conflict resolution example

Goals of the conflict resolution

This example shows a slightly more elaborate example of resolving a conflict, based on the same situation as the previous example, discussed in “A first conflict resolution example” on page 168 .

In this case, the conflict resolution has the following goals:

Disallow the update from a remote database. The previous example allowed the update.

170

Page 188
Image 188
Sybase DC38133-01-0902-01 manual Second conflict resolution example, To test the example