Executing a script automatically on a SQL Anywhere client

On SQL Anywhere clients, an attempt is made to execute any waiting scripts at the end of each synchronization. The available scripts are ordered by run_order and executed one at a time until one of the following occurs:

A script cannot be executed automatically if any of the following are true:

  • The manual flag was specified when the script was created.

  • The script has a non-empty affected publications value plus one or more of the following conditions:

    • No upload was performed.
    • The upload failed.
    • One or more publications listed in the affected publications value were not synchronized.
    • The exclusive flag was specified when the script was created and exclusive locks were not obtained on all synchronizing tables when synchronization began.
    Note

    Download-only publications should never be listed as affected publications.

    At the beginning of a synchronization, dbmlsync may choose to obtain locks on the synchronizing tables that are more restrictive than those requested using the LockTables extended option to ensure that scripts can be executed at the end of the synchronization. For example, if LockTables is set to SHARE but the next script available for execution requires exclusive locks, then exclusive locks may be obtained.