MobiLink Synchronization User's Guide
Adaptive Server Anywhere Clients
Initiating synchronization
To ensure the integrity of synchronizations, dbmlsync must ensure that no rows in the download stream are modified between the time the upload stream is built and the time the download is applied. It offers two mechanisms to ensure this.
By default, dbmlsync obtains an exclusive lock on all tables mentioned in any publication being synchronized. It does this before it begins building the upload stream. Dbmlsync maintains this lock until the download is applied.
When using the locking mechanism, if other connections to the database exist and if these connections have any locks on the synchronization tables, then synchronization will be delayed until the locks are released. If you want to ensure that synchronization proceeds immediately even if other locks exist, use the dbmlsync -d option. When this option is specified, any connection with locks that would interfere with synchronization are dropped by the database so that synchronization can proceed. Uncommitted changes on the dropped connections are rolled back.
For more information, see -d option.
You can further protect data integrity by setting the extended option LockTables to OFF. This causes dbmlsync to track all rows that are modified after the upload stream has been built. When the download is received, it is not applied if any rows in the download have been modified. Dbmlsync will then retry the synchronization. The retry will succeed unless a new download conflict is detected.
For more information, see LockTables (lt) extended option.
By default, dbmlsync will retry synchronization until success is achieved. You can limit the number of retries using the extended option ConflictRetries. Setting ConflictRetries to the -1 causes dbmlsync to retry until success is achieved. Setting it to a non-negative integer causes dbmlsync to retry for not more than the specified number of times.
For more information, see ConflictRetries (cr) extended option.