Lesson 6: Recording synchronization

This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up your MobiLink consolidated database.

In this lesson, you run the dbmlsync utility to initiate MobiLink synchronization for SQL Anywhere remote databases.

 Synchronize with the consolidated database
  1. Perform the first recorded synchronization so that the schema is cached on the MobiLink server.

    Run the following command to synchronize the remote database:

    dbmlsync -c "SERVER=remote;UID=DBA;PWD=sql" -ot remote1.mls -e "sv=MLReplayDemo;scn=on" -v+

    The following table contains a description for each dbmlsync option used:

    Option Description
    -c Specifies the connection string.
    -ot Specifies the file to log messages in.
    -e Specifies the script version to synchronize with and that column names should be sent in the upload for use by mlreplay.
    -v+ Specifies what information is logged. Using -v+ sets maximum verbose logging.

    An output screen appears indicating that the synchronization succeeded. SQL-based synchronization transferred rows in the client T1 table to the T1 table in the consolidated database.

  2. Prepare the remote database for data insertion so that a second synchronization occurs.

    Run the following command to connect to the remote database with Interactive SQL if you are not already connected:

    dbisql -c "SERVER=remote;UID=DBA;PWD=sql"
  3. Load data into the remote database to be uploaded to the MobiLink server by during the replay session.

    Execute the following SQL statement in Interactive SQL:



    INSERT INTO T1 (pk1,pk2,c1) values (0,1,'data1');
    INSERT INTO T1 (pk1,pk2,c1) values (0,2,'data2');
    INSERT INTO T1 (pk1,pk2,c1) values (0,3,'data3');
    INSERT INTO T1 (pk1,pk2,c1) values (0,4,'data4');
    INSERT INTO T1 (pk1,pk2,c1) values (0,5,'data5');
    INSERT INTO T1 (pk1,pk2,c1) values (0,6,'data6');
    INSERT INTO T1 (pk1,pk2,c1) values (0,7,'data7');
    INSERT INTO T1 (pk1,pk2,c1) values (0,8,'data8');
    INSERT INTO T1 (pk1,pk2,c1) values (0,9,'data9');
    INSERT INTO T1 (pk1,pk2,c1) values (0,10,'data10');
    COMMIT;
  4. Perform the second recorded synchronization. This is the protocol that gets replayed.

    Run the following command to synchronize the remote database:

    dbmlsync -c "SERVER=remote;UID=DBA;PWD=sql" -ot remote2.mls -e "sv=MLReplayDemo;scn=on" -v+
  5. Proceed to Lesson 7: Restarting the MobiLink server to replay.

 See also