Lesson 12: Verifying the conflict scripts using the MobiLink Monitor

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.

 Generate an update conflict and detect it with the MobiLink Monitor
  1. Unpause chart scrolling.

    Click Monitor » Pause Chart Scrolling.

  2. 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"
  3. Update the Screwmaster Drill quantity to seven.

    Execute the following SQL statements:

    UPDATE Product SET quantity = 7
        WHERE name ='Screwmaster Drill';
    
    COMMIT;
  4. 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.

  5. Close the client synchronization window.

    Click Shut Down.

  6. 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"
  7. Update the Screwmaster Drill quantity to six.

    UPDATE Product SET quantity = 6
        WHERE name ='Screwmaster Drill';
    
    COMMIT;
  8. 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.

  9. Close the client synchronization window.

    Click Shut Down.

  10. Switch to the MobiLink Monitor and view the results of the synchronization.

  11. Pause chart scrolling.

    Click Monitor » Pause Chart Scrolling.

  12. View statistical information about the synchronization using the MobiLink Monitor Overview pane (the bottom pane), Chart pane, Utilization Graph pane, and Details Table.

    1. Locate the synchronizations in the MobiLink Monitor Overview pane. The sync_mlintro_remote2 synchronization that generated an update conflict appears in red.

    2. 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.

    3. Use the zoom tool to view synchronization detail.

      From the View menu, choose Zoom In.

    4. 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.

  13. Proceed to Lesson 13: Monitoring MobiLink resources with the SQL Anywhere Monitor.

 See also