Use this stored procedure to add custom actions immediately before synchronization is complete.
Name | Value | Description |
---|---|---|
restart (out) |
sync | download | none |
If set to sync, then dbmlsync retries the synchronization it just completed. The value sync replaces true, which is identical but is deprecated. If set to none (the default), then dbmlsync shuts down or restarts according to its command line arguments. The value none replaces false, which is identical but is deprecated. If set to download and the restartable download parameter is true, then dbmlsync attempts to restart the download that just failed. |
exit code (in) |
number |
The exit code for the synchronization just completed. A value other than zero represents a synchronization error. |
publication_n (in) |
publication |
Deprecated. Use subscription_n instead. The publications being synchronized, where n is an integer. There is one publication_n entry for each publication being synchronized. The numbering of n starts at zero. |
MobiLink user (in) |
MobiLink user name |
The MobiLink user for which you are synchronizing. |
upload status (in) |
not sent | committed | failed | unknown |
Specifies the status returned by the MobiLink server when dbmlsync attempted to verify receipt of the upload. The status can be:
|
script version (in) |
script version name |
The MobiLink script version to be used for the synchronization. |
restartable download (in) | true|false |
If true, the download for the current synchronization failed and can be restarted. If false, the download was successful or it cannot be restarted. |
restartable download size (in) | integer |
When the restartable download parameter is true, this parameter indicates the number of bytes that were received before the download failed. When restartable download is false, this value is meaningless. |
error hook user state (in) | integer |
This value contains information about errors and can be sent from the hooks sp_hook_dbmlsync_all_error, sp_hook_dbmlsync_communication_error, sp_hook_dbmlsync_misc_error, or sp_hook_dbmlsync_sql_error. |
subscription_n (in) | subscription name(s) | The names of subscriptions being synchronized where n is an integer. This is one subscription_n entry for each subscription being synchronized. The numbering of n starts at zero. |
If a procedure of this name exists, it is called at the end of each synchronization.
If an sp_hook_dbmlsync_end hook is defined so that the hook always sets the restart parameter to sync, and you specify multiple subscriptions on the dbmlsync command line in the form -s sub1, -s sub2, and so on, then dbmlsync repeatedly synchronizes the first publication and never synchronizes the second.
Actions of this procedure are committed immediately after execution.
In the following example the download is manually restarted if the download for the current synchronization failed and can be restarted.
CREATE PROCEDURE sp_hook_dbmlsync_end() BEGIN -- Restart the download if the download for the current sync -- failed and can be restarted IF EXISTS (SELECT * FROM #hook_dict WHERE name = 'restartable download' AND value='true') THEN UPDATE #hook_dict SET value ='download' WHERE name='restart'; END IF; END; |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |