Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » MobiLink - Server Administration » MobiLink Server System Procedures » MobiLink system procedures

ml_add_user Next Page

ml_delete_sync_state


Use this procedure to delete unused or unwanted synchronization states.

Parameters

Item

Description

Remarks

1

MobiLink user name

VARCHAR(128).

2remote IDVARCHAR(128).
Remarks

These parameters can be NULL. If all the parameters are NULL, the procedure does nothing.

This stored procedure deletes all the rows from the ml_subscription table for the given MobiLink user name and remote ID. It also removes this remote ID from the ml_database table, if the remote ID is no longer referenced by any rows in the ml_subscription table.

If the remote ID is NULL and the MobiLink user name is not NULL, it removes all the rows that are referenced by the given MobiLink user name from the ml_subscription table as well as all the remote IDs from the ml_database table, if these remote IDs are no longer referenced by any rows in the ml_subscription table.

If the MobiLink user name is NULL and the remote ID is not NULL, this stored procedure removes all the rows from the ml_subscription table as well as the ml_database table for the given remote ID.

The MobiLink user will not be removed by this stored procedure, even if all the remote IDs have been deleted from the ml_database table and this user is no longer referenced by any rows in the ml_subscription table. If this MobiLink user needs to be deleted, you may delete it by issuing a command such as

delete * from ml_user where name = 'user_name'

where user_name is the MobiLink user you want to delete.

Use this stored procedure with extreme caution because the MobiLink server will automatically add this remote ID in the ml_database and ml_subscription tables without checking its synchronization status the next time the MobiLink client requests synchronization for this remote ID. It may cause data inconsistency to delete synchronization states for a remote ID that did not have a successful synchronization in the last synchronization.

See also
Example

The following example cleans up MobiLink system table information about remote databases with the remote ID remote_db_for_John for the MobiLink user John:

CALL ml_delete_sync_state( 'John', 'remote_db_for_John' )