Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Any script may be executed manually. For SQL Anywhere clients, scripts are executed manually using the sync_get_next_passthrough_script and sync_execute_next_passthrough_script functions.
The sync_get_next_passthrough_script function takes no parameters and returns the run_order of the next script to be executed. You can then find out about that script by querying the dbo.sync_passthrough_script table.
The dbo.sync_passthrough_script table is defined as follows:
INTEGER. The run_order parameter determines the order in which scripts are applied on the remote database. Scripts are always applied in order by run_order.
This value must be a non-negative integer.
INTEGER. This value uniquely identifies the script.
VARCHAR(128). The name of the script. This column corresponds to the script_name value specified for the script when ml_add_passthrough_script was called on the consolidated database.
BIGINT. The flags column contains the information specified in the flags parameter passed to the ml_add_passthrough_script stored procedure. The flags specified are encoded into an integer by converting each specified flag into the value shown below, and combining the resultant values together with OR operators.
LONG VARCHAR. A list of publications that must be synchronized before the script is run. This column corresponds to the affected_pubs value specified for the script when ml_add_passthrough_script was called.
LONG VARCHAR. The contents of the passthrough script. This column corresponds to the script value specified for the script when ml_add_passthrough_script was called.
VARCHAR(2000). A comment or description of the script. This column corresponds to the description value specified for the script when ml_add_passthrough_script was called.
The sync_get_next_passthrough_script function returns null if there are no more scripts to execute or if the last script executed generated an error and no instructions on how to proceed have yet be received from the server.
The sync_execute_next_passthrough_script function takes no parameters. It executes the next script and updates progress and status information in the database so that the results of the script can be uploaded to the consolidated database later. No script is executed if the last script returned an error and no instructions have yet been received from the MobiLink server on how to handle the error. If a script is executed, the run order of that script is returned. If no script is executed, null is returned. See Capturing script results.
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|