This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up a MobiLink consolidated database.
In this lesson, you generate a conflict by updating the same row on the client databases and use the MobiLink Monitor, started in a previous lesson, to detect the conflict.
In this scenario, both clients start with a Screwmaster Drill inventory of ten items. The first client sells three items, updates their remote database and then synchronizes with the consolidated database. The second client sells four items, updates their remote database, and then synchronizes with the consolidated database. The second client, expecting the consolidated database to contain a value of six, encounters a conflict because of the first sale. When this occurs, the MobiLink server resolves the conflict.
Unpause chart scrolling.
Click Monitor » Pause Chart Scrolling.
Connect to the sync_mlintro_remote database from Interactive SQL if you are not already connected.
Run the following command:
dbisql -c "SERVER=sync_mlintro_remote;UID=DBA;PWD=sql" |
Update the Screwmaster Drill quantity to seven.
Execute the following SQL statements:
UPDATE Product SET quantity = 7 WHERE name ='Screwmaster Drill'; COMMIT; |
Synchronize the sync_mlintro_remote database with the consolidated database.
Run the following command:
dbmlsync -c "SERVER=sync_mlintro_remote;UID=DBA;PWD=sql" -v+ |
The consolidated database updates the Screwmaster Drill quantity to seven.
Close the client synchronization window.
Click Shut Down.
Connect to the sync_mlintro_remote2 database from Interactive SQL if you are not already connected.
Run the following command:
dbisql -c "SERVER=sync_mlintro_remote2;UID=DBA;PWD=sql" |
Update the Screwmaster Drill quantity to six.
UPDATE Product SET quantity = 6 WHERE name ='Screwmaster Drill'; COMMIT; |
Synchronize the sync_mlintro_remote2 database with the consolidated database.
Run the following command:
dbmlsync -c "SERVER=sync_mlintro_remote2;UID=DBA;PWD=sql" -v+ |
The consolidated database updates the Screwmaster Drill quantity to three.
Close the client synchronization window.
Click Shut Down.
Switch to the MobiLink Monitor and view the results of the synchronization.
Pause chart scrolling.
Click Monitor » Pause Chart Scrolling.
View statistical information about the synchronization using the MobiLink Monitor Overview pane (the bottom pane), Chart pane, Utilization Graph pane, and Details Table.
Locate the synchronizations in the MobiLink Monitor Overview pane. The sync_mlintro_remote2 synchronization that generated an update conflict appears in red.
To view the sync_mlintro_remote2 synchronization in the Chart pane, click and drag over the synchronization object in the Overview pane.
The synchronization object is displayed with the pattern you chose for the conflict_detected watch.
Use the zoom tool to view synchronization detail.
From the View menu, choose Zoom In.
Double-click the synchronization object or the corresponding row in the Details Table pane to view synchronization properties, and click the Upload tab to see the number of conflicted updates.
Proceed to Lesson 13: Monitoring MobiLink resources with the SQL Anywhere Monitor.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |