MobiLink: How to add a new table to synchronisation using Sybase Central and mlagent
-
28-09-2020 - |
Question
How to add a new table to a synchronisation using mlagent
configured from Sybase Central. This might be related to this or this question.
When doing a change on remote database as described on Sybase Tutorial it's not updating the consolidated database as well as the synchronisation model. When updating the model and add maybe a complete new table (or a new column) what is the correct way on doing this using mlagent
and remote tasks configured from inside Sybase Central?
Solution
This seems¹ to work:
- Create a new Remote Schema Name (e.g. v2.0)
- Do changes on your consolidated database (e.g. CREATE TABLE-statement)
- Update schema inside your synchronisation profile and maybe increase version string (on my current test it appears to doesn't matter)
- Do a deployment of your update synchronisation profile. You will need update ml_columns and ml_tables as well as ml_table_scripts etc on your consolidated database fitting your update synchronisation profile. So apply the changes to it. Also you will need the SQL of remote database
- Create an upgrade remote task including the remote SQL created with step 4 (EXECUTE SQL). This task should also change Remote Schema Name
- Maybe iterate your sync- task and deploy both -- upgrade task and sync task
- Should be done
The biggest issue is, that the script in default is droping the tables on remote side so a huge amount of data might be transferred after update.
¹ I was able to get this running on a local test scenario with minimum database.