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 7: Configuring the MobiLink Listener

In this lesson, you configure the MobiLink Listener by storing the MobiLink Listener options in a text file, and then running dblsn with the file name specified at the command line.


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. Run the following command to synchronize with the MobiLink server and create the SIS_CarDealer_LP_DBLSN_REM.rid file:

    dbmlsync -c "SERVER=SIS_CarDealer_LP_DBLSN_REM;UID=DBA;PWD=sql" -e sa=on -o rem1.txt -v+

    The MobiLink Listener can use the $remote_id action variable to define a poll key, which the MobiLink server uses to identify the device. This variable is retrieved from the remote ID file, SIS_CarDealer_LP_DBLSN_REM.rid, which is created during the initial synchronization with the MobiLink server. You must synchronize with the MobiLink server to make use of the remote ID file.

  2. Click Shut Down on the SQL Anywhere MobiLink client window.

  3. Create a MobiLink Listener command file by creating a text file with the following contents:

    # Verbosity level
    # Show notification messages in console and log
    # Truncate, then write output to dblsn.txt
    -ot dblsn.txt
    # Remote ID file (defining the scope of $remote_id)
    -r SIS_CarDealer_LP_DBLSN_REM.rid
    # Message handlers
    # Watch for a notification without action
    -l "poll_connect='tcpip(host=localhost)';
    # Signal dbmlsync to launch, sync and then shutdown
    -l "poll_connect='tcpip(host=localhost)';
        action='run dbmlsync.exe -c SERVER=SIS_CarDealer_LP_DBLSN_REM;UID=DBA;PWD=sql -e sa=on -o rem1.txt -v+';"
    # Shutdown the MobiLink Listener
    -l "poll_connect='tcpip(host=localhost)';
        action='DBLSN FULL SHUTDOWN';"
  4. This tutorial assumes c:\MLsis as the working directory for server-side components. Save the text file as mydblsn.txt in this directory.

  5. Start the MobiLink Listener.

    At a command prompt, navigate to c:\MLsis or to the directory where you saved your MobiLink Listener command file.

    Start the MobiLink Listener by running the following command:

    dblsn @mydblsn.txt

    The MobiLink Listener for Windows window appears, indicating the MobiLink Listener is sleeping.


The MobiLink Listener is configured.

 See also