In this lesson, you modify the synchronization model for your consolidated database that was created when you created a new MobiLink project.
Prerequisites
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.
Right click the oracle_remote_schema synchronization model and choose Properties.
Type sync_oracle in the first field.
Perform the following tasks:
In the Publication name field, type sync_oracle_publication.
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.
Click Apply and then click OK.
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:
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.
Filter the rows downloaded to the remote database by remote ID.
Select the row containing the ORDERS table and then Click the Download Subset tab at the bottom of the right pane.
Change the Download Subset column to Custom.
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.
Click the Download Delete Subset tab and change the Download Delete Subset from Same to None.
Save the synchronization model.
Click File » Save.
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |