Returns information about the last synchronization initiated by the SYNCHRONIZE statement.
sp_get_last_synchronize_result ( @conn_id, @complete_only )
@conn_id Use this INTEGER parameter to specify the connection ID number for a connection on which the SYNCHRONIZE statement was executed. If no value is specified, then the connection ID of the current connection is used.
@complete_only Set this BIT parameter to 1 to have the stored procedure return information about completed synchronizations. Set the parameter to 0 to return information about synchronizations that are currently active.
Column name | Data type | Description |
---|---|---|
row_id | BIGINT | The primary key of the table used to determine the order in which rows were inserted into the table. |
conn_id | UNSIGNED INT | The connection ID number. |
result_time | TIMESTAMP | The time the event was added to the synchronize_results table. |
result_type | CHAR(128) | The type of event. For more information on the different types of events, see DBSC_Event structure. |
result_message | CHAR(1024) | The message text associated with the event. |
To view details of past or current synchronizations, you can use the sp_get_last_synchronize_result stored procedure as an alternative to directly querying the synchronize_results global shared temporary table. The stored procedure only returns the results of the last synchronization for the specified connection ID number. If you do not specify any parameters, the last completed synchronization on the current connection is returned.
You can also use this stored procedure to monitor the progress of a synchronization on a connection that is different from your current connection. To monitor the progress of a synchronization on a different connection:
Execute a SELECT CONNECTION_PROPERTY statement to determine the connection ID of your current connection.
Execute a SYNCHRONIZE statement using the connection ID returned by the SELECT CONNECTION_PROPERTY statement.
On a different connection, execute a SELECT CONNECTION_PROPERTY statement and set the @complete_only parameter to 0. Information about the last synchronization for the specified connection is returned, even if the synchronization is incomplete.
DBA
None
The following example returns information about the last synchronization that completed on the current connection.
CALL sp_get_last_synchronize_result(); |
The following example returns information about the last completed synchronization that was initiated from connection ID 25.
CALL sp_get_last_synchronize_result( @conn_id=25, @complete_only=1); |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |