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

SAP Sybase SQL Anywhere 16.0 » MobiLink - Client Administration » Introduction to MobiLink clients » Schema changes in remote MobiLink clients

 

Altering a published table in a deployed SQL Anywhere remote database

You can change a table definition in a SQL Anywhere remote database that has been deployed.

Prerequisites

You must be the owner of the publication, or have one of the following:

  • ALTER privilege on the publication
  • SYS_REPLICATION_ADMIN_ROLE system role

Context and remarks

When a MobiLink client synchronizes with a new schema, it expects scripts, such as upload_update or download_cursor, which have parameters for all columns in the remote table. An older remote database expects scripts that have only the original columns.

 Task
  1. At the consolidated database, create a new script version.

  2. For your new script version, create scripts for all tables in the publication(s) that contain the table that you want to alter and that are synchronized with the old script version.

  3. Perform a normal synchronization of the remote database using the old script version. Ensure that the synchronization is successful before proceeding.

  4. At the remote database, use the ALTER PUBLICATION statement to temporarily drop the table from the publication. For example:

    ALTER PUBLICATION your_pub
      DROP TABLE table_name; 

    You can use this statement inside a sp_hook_dbmlsync_schema_upgrade hook.

  5. At the remote database, use the ALTER TABLE statement to alter the table.

  6. At the remote database, use the ALTER PUBLICATION statement to add the table back into the publication.

    You can use this statement inside a sp_hook_dbmlsync_schema_upgrade hook.

  7. Synchronize with the new script version.

Results

The published table is altered.

 See also