This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up a MobiLink consolidated database.
In this lesson, you use the Create Synchronization Model Wizard to create a new synchronization model.
Before you can create a model, you must use the Create Project Wizard to create a new MobiLink project. You can then access the Create Synchronization Model Wizard from the Create Project Wizard.
Click Start » Programs » SQL Anywhere 12 » Administration Tools » Sybase Central.
Click Tools » MobiLink 12 » New Project.
The Create Project Wizard appears.
In the Name field, type mlintro_project.
In the Location field, type C:\MLintro, and click Next.
Select the Add A Consolidated Database To The Project option.
In the Database Display Name field, type mlintro_consdb.
Perform the following tasks on the Connect To A Generic ODBC Database page:
In the User ID field, type DBA.
In the Password field, type sql.
In the ODBC Data Source Name field, click Browse and select mlintro_consdb.
Click OK, and click Save.
Select the Remember The Password option, and click Next.
Select Create A New Model, and click Next.
Select the Add A Remote Schema Name To The Project option.
In the What Do You Want To Name The New Remote Schema field, type My Application 1.0 and click Finish.
Click Yes to install the MobiLink system tables, and click OK.
The Create Synchronization Model Wizard appears.
In the What Do You Want To Name The New Synchronization Model field, type sync_mlintro and click Next.
Select the mlintro_consdb consolidated database from the list, and click Next.
Click No, Create A New Remote Database Schema, and click Next.
On the New Remote Database Schema page, ensure that only the Product table is selected from the Which Consolidated Database Tables And Columns Do You Want To Have In Your Remote Database list, and click Next.
Click Timestamp-based Download, and click Next.
Timestamp-based downloads minimize the amount of data that is transferred because only data that has been updated since the last download is transmitted.
On the Timestamp Download Options page, click Use Shadow Tables To Hold Timestamp Columns, and click Next.
Using shadow tables is often preferred because it does not require any changes to existing tables.
Perform the following tasks on the Download Deletes page:
Click Yes for the Do You Want Data Deleted On The Consolidated Database To Be Deleted On The Remote Databases option.
Click Use Shadow Tables To Record Deletions.
MobiLink creates shadow tables on the consolidated database to implement deletions that can be synchronized.
Click Yes, Download the Same Data to Each Remote, and click Next.
Click No Conflict Detection, and click Next.
Perform the following tasks on the Publication, Script Version And Description page:
In the What Do You Want To Name The Publication field, type sync_mlintro_publication.
In the What Do You Want To Name The Script Version field, type sync_mlintro_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.
Proceed to Lesson 4: Deploying the synchronization model.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|