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

SAP Sybase SQL Anywhere 16.0 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization tutorials » Tutorial: Configuring server-initiated synchronization using light weight polling


Lesson 8: Issuing push requests

In this lesson, you make a change to the Dealer table in the consolidated database so that the information can be downloaded into the remote database when the MobiLink Listener polls for push notifications. You then prompt a server-initiated synchronization by inserting a poll key value into the consolidated database. The Notifier runs the request_cursor event, detects the poll key in the non_sync_request table, then sends a push notification to the MobiLink Listener. When the MobiLink Listener receives the push notification, it synchronizes with the MobiLink database and updates the remote database.


This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up the consolidated database.

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Configuring server-initiated synchronization using light weight polling.

  1. Connect to your consolidated database in Interactive SQL if you are not already connected.

    Run the following command:

    dbisql -c "dsn=SIS_CarDealer_LP_DBLSN_CONDB"
  2. Execute the following SQL statements:

    UPDATE Dealer
        SET RATING = 'B' WHERE name = 'Geo'; 
  3. Issue push requests by populating the non_sync_request table directly. The poll key column determines which device should receive push notifications.

    Execute the following SQL statements:

    INSERT INTO non_sync_request(poll_key) VALUES ('%remote_id%.no_action');
  4. Wait a few seconds for the synchronization to occur.

    The MobiLink Listener should poll the consolidated database, download the push notification, then update the Dealer table on the remote database.

  5. Stop server-initiated synchronization with a device by deleting the poll key value from the non_sync_request table on the consolidated database.

    Execute the following SQL statements:

    DELETE FROM non_sync_request WHERE poll_key = '%remote_id%.no_action';
  6. Confirm that the Dealer table on the remote database was updated.

    Execute the following SQL statement:

    SELECT * FROM Dealer

    The rating for Geo should now be B.


A change is made in the consolidated database and server-initiated synchronization is initiated.


Proceed to Cleaning up.

 See also