Contents Index sp_hook_dbmlsync_process_return_code sp_hook_dbmlsync_upload_begin

MobiLink Synchronization Reference
  Stored Procedures
    Client event-hook procedures

sp_hook_dbmlsync_schema_upgrade


Function 

Use this stored procedure to run a SQL script that revises your schema.

Rows in #hook_dict table  
Name Values Description
publication_n (in) publication name The publications being synchronized, where n is an integer. There is one publication_n entry for each publication being uploaded.
MobiLink user (in) MobiLink user name The MobiLink user for which you are synchronizing.
script version name of script version The script version that you are synchronizing.
drop hook (out) never | always | on success The values can be:

never - (the default) Do not drop the sp_hook_dbmlsync_schema_upgrade hook from the database.

always - After attempting to run the hook, ,drop the sp_hook_dbmlsync_schema_upgrade hook from the database.

on success - If the hook runs successfully, drop the sp_hook_dbmlsync_schema_upgrade hook from the database. On success is identical to always if the dbmlsync -eh option is used, or the dbmlsync extended option IgnoreHookErrors is set to true.

script version (in) script version name The MobiLink script version to be used for the synchronization.
Description 

This stored procedure is intended for making schema changes to deployed remote databases. Using this hook for schema upgrades ensures that all changes on the remote database are synchronized before the schema is upgraded, which is required to ensure that the database will continue to be able to synchronize. When this hook is being used you should not set the dbmlsync extended option LockTables to off (LockTables is on by default).

During any synchronization where the upload was applied successfully and acknowledged by MobiLink, this hook is called after the sp_hook_dbmlsync_download_end hook and before the sp_hook_dbmlsync_end hook. This hook is not called during download-only synchronization or when a file-based download is being created or applied.

Actions performed in this hook are committed immediately after the hook completes.

See also 

Schema changes in remote databases


Contents Index sp_hook_dbmlsync_process_return_code sp_hook_dbmlsync_upload_begin