In this lesson you use the dbmlsync utility to initiate MobiLink synchronization. Before starting dbmlsync, add order data and comments to your remote database.
Prérequis
This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up an XML data source.
This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Synchronizing with XML.
Connect to the MobiLink client database from Interactive SQL if you are not already connected.
Run the following command:
dbisql -c "SERVER=remote1;UID=DBA;PWD=sql" |
Add an order to the RemoteOrders table in the client database.
Execute the following SQL statement in Interactive SQL:
INSERT INTO RemoteOrders (order_id, product_id, quantity, order_status) VALUES (1,12312,10,'new'); |
Add a comment to the OrderComments table in the client database.
Execute the following SQL statement in Interactive SQL:
INSERT INTO OrderComments (comment_id, order_id, order_comment) VALUES (1,1,'send promotional material with the order'); |
Commit your changes.
Execute the following SQL statement in Interactive SQL:
COMMIT; |
Run the following command at a command prompt:
dbmlsync -c "SERVER=remote1;UID=DBA;PWD=sql" -o rem1.txt -v+ |
The following table contains a description for each dbmlsync option used in this lesson:
Option | Description |
---|---|
-c | Specifies the connection string. |
-o | Specifies the message log file rem1.txt. |
-v+ | The -v option specifies what information is logged. Using -v+ sets maximum verbose logging. |
Once you have started the MobiLink synchronization client, an output screen appears indicating that the synchronization succeeded.
SQL-based synchronization transferred rows in the client RemoteOrders table to the RemoteOrders table in the consolidated database.
Perform the following steps to verify that the information added to the client RemoteOrders table was transferred to the RemoteOrders table in the consolidated database:
To start Interactive SQL at a command prompt, run the following command:
dbisql -c "DSN=mlxml_db" |
Execute the following SQL statement in Interactive SQL:
SELECT * FROM RemoteOrders; |
Java processing inserted your comment in the XML file.
Go to c:\MLobjxml and open order_comments.xml in a text editor to verify that the comment was inserted.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |