Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » MobiLink - Getting Started » MobiLink plug-in for SQL Central » Synchronization models

Synchronization model deployment

You deploy synchronization models with the Deploy Synchronization Model Wizard.

The following items can be deployed:

  • Changes to the consolidated database.

  • SQL Anywhere or UltraLite remote databases (you can choose to create a database, or add tables to an existing empty database, or use an existing database that already has your remote tables).

  • Batch files to deploy the model (the generated batch files have variable declarations at the beginning that you can edit before running the batch files).

  • Batch files to run the MobiLink server and the MobiLink client.

In the MobiLink 17 plug-in, schemas are compared when you deploy a synchronization model. Only database objects (for example, tables, indexes, and so on) that are different from the objects being deployed are modified. You are warned if deploying the new objects will break the existing synchronization system and you are given the chance to abort the operation. This functionality is not available for IBM DB2 LUW consolidated databases.

Redeploying updates to the same script version automatically removes schema no longer required by the new script version. For example, if a last_modified column is added to a table to support downloads but you change to upload only synchronization, then the last_modified column is dropped during deployment.

You can also use the ml_model_drop system procedure to remove a synchronization model and its schema from the consolidated database. This system procedure drops the synchronization scripts and any schema that was created when the synchronization model was deployed, including shadow tables, tracking columns, triggers, and indexes. Schema that is shared with another script_version is not deleted. Only schema installed using the MobiLink 17 plug-in can be dropped. This functionality is not available for IBM DB2 LUW consolidated databases.

Deploying to the consolidated database

The Deploy Synchronization Model Wizard provides two options for deploying to the consolidated database:

  • Apply your synchronization model directly to your consolidated database by populating MobiLink system tables and creating all required shadow tables, columns, triggers, and stored procedures.
  • Create a UTF-8 encoded SQL file that contains all the same changes and a batch file to run the SQL file against your consolidated database. You can inspect this file, alter it, and run it anytime. The effect is identical to applying the changes directly.