Contents Index sp_hook_dbmlsync_upload_end Utilities

MobiLink Synchronization Reference
  Stored Procedures
    Client event-hook procedures

sp_hook_dbmlsync_validate_download_file


Function 

Use this hook to implement custom logic to decide if a download file can be applied to the remote database.

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. The n in publication_n and generation number_n match.
MobiLink user (in) MobiLink user name The MobiLink user for which you are synchronizing.
file last download time (in) The download file's last download time. (The download file contains all rows that were changed between its last download time and its next last download time.)
file next last download time (in) The download file's next last download time. (The download file contains all rows that were changed between its last download time and its next last download time.)
file creation time (in) The time when the download file was created.
file generation number_n (in) There is one file generation number_n for each publication_n entry. The n in publication_n and generation number_n match.
user data (in) The string specified with the dbmlsync -be option when the download file was created.
apply file (in|out) True|False If true (the default), the download file will be applied only if it passes dbmlsync's other validation checks. If false, the download file will not be applied to the remote database.
check generation number (in|out) True|False If true (the default), dbmlsync only applies the download file if the generation numbers stored in the file match those in the remote database. If false, dbmlsync will apply the file even if the generation numbers do not match.
setting generation number (in) True|False True if the -bg switch was used when the download file was created. If -bg was used, the generation numbers on the remote database are updated from the download file and normal generation number checks are not performed.
Description 

Use this stored procedure to implement custom checks to decide if a download file can be applied.

If you want to compare the generation numbers or timestamps contained in the file with those stored in the remote database, they can be queried from the SYSSYNC and SYSPUBLICATION tables.

This hook is called when the -ba option is specified. It is called after the sp_hook_dbmlsync_upload_end hook and before the sp_hook_dbmlsync_download_begin hook.

The actions of this hook are committed immediately after it completes.

See also 

-be option

-bg option

File-Based Downloads


Contents Index sp_hook_dbmlsync_upload_end Utilities