Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » MobiLink - Getting Started » MobiLink tutorials » Tutorial: Simulating multiple MobiLink clients using the MobiLink Replay utility

 

Lesson 8: Replaying synchronization

In this lesson, you perform a synchronization so that the schema is cached on the MobiLink server. You create the simulated client information file to replay the MobiLink protocol information about the simulated clients.

Prerequisites

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

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Simulating multiple MobiLink clients using the MobiLink Replay utility.

Context and remarks

The simulated client information file is only necessary when replaying the recorded protocol concurrently across multiple simulated clients.

 Task
  1. Run the following command to synchronize the remote database:

    dbmlsync -c "SERVER=remote;UID=DBA;PWD=sql" -ot remote3.mls -e "sv=MLReplayDemo" -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 to.
    -e Specifies the script version to synchronize with.
    -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. Create a simulated client information file for use with the mlreplay utility.

    Create a new text file and write the following comma-separated list as displayed:



    mlreplay1,,1,
    mlreplay2,,2,
    mlreplay3,,3,
    mlreplay4,,4,
    mlreplay5,,5,
    mlreplay6,,6,
    mlreplay7,,7,
    mlreplay8,,8,
    mlreplay9,,9,
    mlreplay10,,10,
  3. Save the file as mlreplay.csv in your working directory.

    The client information file can be used to simulate ten remote clients.

  4. Replay the recorded synchronization with simulated clients.

    Run the following command:

    mlreplay -ap -x tcpip -ot mlreplay.mls -sci mlreplay.csv recorded_protocol_mlreplay_svr_2.mlr

    The following table contains a description for each option used:

    Option Description
    -ap Adjusts the progress of synchronizations being replayed in a replay session so that the mlreplay utility does not cause progress offset mismatch warnings on the MobiLink server.
    -x Sets the protocol used to listen for synchronization requests.
    -ot Specifies the file to log messages.
    -sci Specifies the location of the client information file.

    The mlreplay utility stores information from the start of the connection to the end of the connection in a recorded protocol file named recorded_protocol_mlreplay_svr_2.mlr.

  5. Open the mlreplay.mls log file with a text editor to review the outcome of the MobiLink replay.

Results

A synchronization is performed, the schema is cached on the MobiLink server, and a simulated client information file is created to replay the MobiLink protocol information about the simulated clients.

Next

Proceed to Cleaning up.

 See also