In this lesson, you run the dbmlsync utility to initiate MobiLink synchronization for SQL Anywhere remote databases.
Prérequis
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.
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" -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. |
-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.
Prepare the remote database for data insertion so that a second synchronization occurs.
You should still be connected to the remote database with Interactive SQL. If you are not, run the following command to connect to the remote database:
dbisql -c "SERVER=remote;UID=DBA;PWD=sql" |
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; |
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" -v+ |
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |