I am in process of doing a SQL Anywhere 5 to SQL Anywhere 12 upgrade. The client uses SQL Remote to synchronize between a consolidated database and roughly 40 remote databases.
In v5, when a given record is updated both at the consolidated database and at the remote database, an error is thrown (good) when DBREMOTE.EXE is run at the consolidated database. In contrast, in v12, no error is thrown (bad) when DBREMOTE.EXE is run at the consolidated database and the latest version of the record is automatically applied. I consider this “bad” because manual intervention is required to determine what the record should actually contain.
When the same row is updated in two places, the update of that record needs to be blocked when DBREMOTE is run and manual intervention is required to determine what the record needs to contain.
So, I need help with:
1) forcing an update conflict situation - what options can I set out of the box to force the update conflict? Is there a UI screen or table to show conflicts? 2) what methods do I need to implement to throw an error and have it display in the DBREMOTE window (as was the case in v5)? 3) I need a sample of code, if I need to implement triggers, etc.
asked 05 Jun '12, 17:37
What version of v5 are you using?
Have you set the VERIFY_ALL_COLUMNS option to 'ON'?
FWIW, I'm not aware that the handling of update conflicts has changed between v5.5.05 and current versions at all (but experts like Reg will know better!). To cite the v5.5.05 docs:
AFAIK, it's still the simple model as following (I assume each row is identified by a PK):
Note, there's no sample for a "Report the conflict into a table" handling but we could surely give hints.
However, in order to stop SQL Remote when detecting a conflict (if that really is a requirement) instead of an automated conflict handling, I think you would then have to raise an exception from within the UPDATE RESOLVE trigger.