Totest the example
1. Create the tables and the procedure in the consolidated database, and add
themas conflict resolution objects to the Customer table.
2. Insert and commit a change at the consolidated database. Forexample:
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
runningthe Message Agent at the remote database to send the message,
andthen at the consolidated database to receive and apply the message.
5. At the consolidated database, view the Customer table and the
ConflictLogtable. TheCustomer table contains the value from the
remotedatabase:
cust_key name rep_key
cust1 CSports rep1
TheConflictLog table has a single row, showing the conflict:
conflict_key lost_name won_name
1 SeaSports CSports
A second conflict resolution example
Thisexample shows a slightly more elaborate example of resolving a
conflict,based on the same situation as the previous example, discussed in
“Afirst conflict resolution example” on page 168.
Goalsof the conflict
resolution Inthis case, the conflict resolution has the following goals:
Disallowthe update from a remote database. Theprevious example
allowedthe update.
170