This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up your MobiLink consolidated database.
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 on the simulated clients. The simulated client information file is only necessary when replaying the recorded protocol concurrently across multiple simulated clients.
Run the following command to synchronize the remote database:
dbmlsync -c "SERVER=remote;UID=DBA;PWD=sql" -ot remote3.mls -e "sv=MLReplayDemo;scn=on" -v+
The following table contains a description for each dbmlsync option used:
|-c||Specifies the connection string.|
|-ot||Specifies the file to log messages to.|
|-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.
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,
Save the file as mlreplay.csv in your working directory.
The client information file can be used to simulate ten remote clients.
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:
|-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.
Open the log file with a text editor to review the outcome of the MobiLink replay.
Proceed to Cleaning up.
Discuss this page in DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|