Contents Index -q option -sc option

MobiLink Synchronization Reference
  MobiLink Synchronization Client
    dbmlsync options

-r option


Function 

Specifies that the remote offset should be used when there is disagreement between the offsets in the remote and consolidated databases.

The -rb option can be used when the remote offset is less than the consolidated offset (such as when the remote database has been restored from backup). The -r option is provided for backward compatibility and is identical to -rb. The -ra option, used when the remote offset is greater than the consolidated offset, is provided only for very rare circumstances and may cause data loss.

Syntax 

dbmlsync { -r | -ra | -rb } ...

Description 

The offset, also called the progress, refers to a position in the transaction log of the remote database. It indicates the point to which all operations for the subscription have been uploaded and acknowledged. dbmlsync uses the offset to decide what data to upload. On the remote database, the offset is stored in the progress column of the SYS.SYSSYNC system table. On the consolidated database, the offset is stored in the progress column of the ml_user table for version 7.x databases, and in the progress column of the ml_subscription table for version 8.0 and up databases.

For each remote, the remote and consolidated databases maintain an offset for every subscription. When a user synchronizes, the offsets are confirmed for all subscriptions that are associated with the user. If there is any disagreement between the remote and consolidated database offsets, the default behavior is to update the offsets on the remote with values from the consolidated and then send a new upload based on those offsets. In most cases, this default is appropriate. For example, it is generally appropriate when the consolidated database is restored from backup and the remote transaction log is intact, or when an upload is successful but communication failure prevented an upload acknowledgement from being sent.

-rb    If the remote database is restored from backup, the default behavior may cause data to be lost. In this case, the first time you run dbmlsync after the remote database is restored, you should specify -rb. When you use -rb, the upload continues from the offset recorded in the remote database if the offset recorded in the remote is less than that obtained from the consolidated database. If you use -rb and the offset in the remote is not less than the offset from the consolidated database, an error is reported and the synchronization is aborted.

The -rb option may result in some data being uploaded that has already been uploaded. This can result in conflicts in the consolidated database and should be handled with appropriate conflict resolution scripts.

-ra    The -ra option should be used only in very rare cases. If you use -ra, the upload is retried starting from the offset obtained from the remote database if the remote offset is greater than the offset obtained from the consolidated database. If you use -ra and the offset in the remote is not greater than the offset from the consolidated database, an error is reported and the synchronization is aborted.

The -ra option should be used with care. If the offset mismatch is the result of a restore of the consolidated database, changes that happened in the remote database in the gap between the two offsets are lost. The -ra option may be useful when the consolidated database has been restored from backup and the remote database transaction log has been truncated at the same point as the remote offset. In this case, all data that was uploaded from the remote database is lost from the point of the consolidated offset to the point of the remote offset.


Contents Index -q option -sc option