Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I've read Implementing timestamp-based downloads and its subsections multiple times and it has only confused me further:

Why is there a last_modified timestamp in each table in the consolidated DB, but NOT in the remote DBs? As per The synchronization process

By default, the MobiLink client automatically keeps track of which rows in the remote database have been inserted, updated, or deleted since the last successful synchronization. Once the connection is established, the MobiLink client uploads a list of all these changes to the MobiLink server.

If one can keep track of which rows have been synced, and which haven't, WITHOUT the last_modified column, why is it required in each table in the consolidated DB?

Now, as-per How download timestamps are generated and used...

The last download time is stored on the remote database. This is the appropriate place because only the remote database knows if the download has been successfully applied. For SQL Anywhere remotes, the last download time is stored per subscription and can be viewed using the SYSSYNC system view.

... whereas as per Implementing timestamp-based downloads...

To implement timestamp-based synchronization for a table, at the consolidated database, add a last_modified column that holds the most recent time the row was modified.

How many timestamps are we talking about here? Where is each one of them stored? And why does every table in the remote-db not have a last_modified column?

asked 08 Sep '20, 02:06

saurabhnanda's gravatar image

accept rate: 0%

When the sync completes, your remote DB knows this timestamp already. It is not a timestamp (instant) value per table/record/whatever. It is either everything, or nothing.

When you start another sync, this timestamp value is sent to Mobilink, where it just compares the "last successful sync timestamp" with all tables & records that you want to synchronize again. Something like:

SELECT * FROM yourTable WHERE last_modified >= ?

This SQL will return you new records, that will be sent to Remote DB. And your timestamp will be updated eventually.

Something like that...

(08 Sep '20, 02:58) Vlad
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Sep '20, 02:06

question was seen: 600 times

last updated: 08 Sep '20, 02:58