Adaptive Server Anywhere Client Synchronization Parameters
Specifies that each transaction on the remote database should be uploaded as a separate transaction within one synchronization.
dbmlsync -tu ...
When you use -tu, you create a transaction-level upload: dbmlsync uploads each transaction on the remote database as a distinct transaction. If you change the same row three times on the remote database and commit the change each time, each of the three transactions is applied in the next upload stream. The transactions are uploaded in a single synchronization, on a single connection, but each transaction is committed as soon as it is successfully uploaded.
When you use -tu, the order of transactions on the remote database is always preserved on the consolidated database. However, the order of operations in a transaction may not be preserved, for two reasons:
MobiLink always applies updates based on foreign key relationships. For example, when data is changed in child and parent tables, MobiLink inserts data into the parent table before the child table, but deletes data from the child before the parent. If your remote operations do not follow this order, the order of operations will be different on the consolidated database.
Operations within a transaction are coalesced. This means that if you change the same row three times in one transaction, only the final form of the row is uploaded.
When you do not use -tu, MobiLink coalesces all changes on the remote database into one transaction in the upload stream. This means that if you change the same row three times between synchronizations, regardless of the number of remote transactions, only the final form of the row is uploaded. This default behavior is efficient and is optimal in many situations.
However, in certain situations you may wish to preserve remote transactions on the consolidated database. For example, you may wish to define triggers on the consolidated database that act on transactions as they occur in the remote database. Or you may want the consolidated database to reflect all changes on the remote database, regardless of when synchronization occurs.
In addition, there are advantages to breaking up the upload stream into smaller transactions. Many consolidated databases are optimized for small transactions, so sending a very large transaction is not efficient or may cause too much contention. Also, when you use -tu each transaction is applied as it is successfully uploaded, so you may not lose the entire upload if there are communications errors during the upload. When you use -tu and there is an upload error, all successfully uploaded transactions are applied.
When you use -tu, performance will be improved if you start the MobiLink synchronization server with the -us option, which prevents MobiLink from invoking scripts for tables which have no data to upload.
The -tu option makes MobiLink behave in a manner that is very close to SQL Remote. The main difference is that SQL Remote replicates all changes to the remote database in the order they occur, without coalescing. To mimic this behavior, you must commit every change, because -tu causes MobiLink to replicate all transactions.
You cannot use -tu with the Increment extended option.
SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.