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 - Getting Started » MobiLink tutorials » Tutorial: Using MobiLink with an Oracle Database 10g


Lesson 6: Modifying a synchronization model

In this lesson, you modify the synchronization model for your consolidated database that was created when you created a new MobiLink project.


This lesson assumes you have completed all preceding lessons. See Lesson 1: Designing the schemas.

This lesson assumes you have the roles and privileges listed in the Permissions and privileges section at the start of this tutorial: Tutorial: Using MobiLink with an Oracle Database 10g.

  1. Right click the oracle_remote_schema synchronization model and choose Properties.

  2. Type sync_oracle in the first field.

  3. Perform the following tasks:

    1. In the Publication name field, type sync_oracle_publication.

    2. In the Script version field, type sync_oracle_scriptversion.

      The publication is the object on the remote database that specifies what data is synchronized. MobiLink server scripts define how uploaded data from remotes should be applied to the consolidated database, and script versions group scripts. You can use different script versions for different applications, allowing you to maintain a single MobiLink server while synchronizing different applications.

    3. Click Apply and then click OK.

  4. Set the direction that data is synchronized for each table in the synchronization model.

    Click the Mappings tab in the right pane, and set the rows in the Mapping Direction column as follows:

    • The ORDERS and ORDER_ITEMS tables should be set to Bi-directional (both upload and download).
    • The remaining tables should be set to Download to remote only.
  5. If a window appears indicating that loading the consolidated schema for all owners may take a long time, choose to load the database schema for the HR and OE users.

  6. Filter the rows downloaded to the remote database by remote ID.

    1. Select the row containing the ORDERS table and then Click the Download Subset tab at the bottom of the right pane.

    2. Change the Download Subset column to Custom.

    3. Filter the rows by remote ID, which uniquely identifies the remote database, by adding a restriction to the WHERE clause of the download_cursor script.

      Type a search condition in the SQL expression to use in the download cursor's WHERE clause field. For example, the following SQL script can be used for the ORDERS table:

      OE.ORDERS.SALES_REP_ID = {ml s.remote_id}

      The download cursor script specifies what columns and rows are downloaded from each table to the remote database. The search condition ensures that you only download information about one sales representative, namely, the sales representative that has an identifier that equals the remote ID for the database.

    4. Click the Download Delete Subset tab and change the Download Delete Subset from Same to None.

  7. Save the synchronization model.

    Click File » Save.


The synchronization model is complete and ready for deployment.

 See also