The dbmlsync utility initiates MobiLink synchronization for SQL Anywhere remote databases. Before starting dbmlsync, add order data and comments to your remote database.
Connect to the MobiLink client database in 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.
Run the following SQL script 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.
Run the following SQL script in Interactive SQL:
INSERT INTO OrderComments (comment_id, order_id, order_comment) VALUES (1,1,'send promotional material with the order') |
Commit your changes.
Run the following SQL script in Interactive SQL:
COMMIT; |
Run the following command at the command prompt:
dbmlsync -c "server=remote1;uid=DBA;pwd=sql" -e scn=on -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. |
-e scn | Sets SendColumnNames to on. This is required by direct row handling if you want to reference columns by name. |
-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.
Java processing inserted your comment in the XML file.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |