Deployment of the MobiLink Synchronization Model Wizard in SQL Anywhere 10

Part one of this two-part series described how a synchronization model for mobile and remote applications can be easily created in SQL Anywhere 10. We specifically designed a model that would connect to a MS SQL 2005 Server consolidated database. Part two examines the steps needed to deploy the synchronization model created in part one.

To begin, open Sybase Central showing the Tasks list as in the previous window. Click on the ‘Open a synchronization model’ navigation shortcut on the left. This opens the Browse… window pointing to the saved location of the last .mlsm file.

Choose the file and click on the Open button. This will open the login page where you provide the information, UserID, Password, and the ODBC dsn, then click on the OK button in the login screen. This opens the model in the Sybase Central as shown in the Mobilink panel in the ‘model’ view. This screen shows the dbo owned table(s).

In the synchronization Model tasks window there are two items. One of the items is "Deploy the synchronization model" and the other is "Add table mappings." Click on the ‘Deploy the synchronization model’ shortcut to invoke the wizard that will guide you through the steps for synchronization.

{mospagebreak title=Welcome to the Wizard}

Clicking on the "Deploy the synchronization model" opens the ‘Welcome‘ step of the wizard, where you choose the deployment details. You specify the consolidated database; the Remote database; the synchronization client; and the MobiLink Server. Since this model has never been deployed before, the other options are grayed out and come up with default details as shown.

Choose all the items (default) and click on the Next button. This opens the Consolidated Database Deployment Destination step of the wizard as shown in the next picture. Here the destination of the deployment will be specified. There are two options. One of the options is to deploy the synchronization to a file that can be run later; the second option is to deploy directly to the database. Both options are chosen (default). For direct deployment to the consolidated database you need to connect to the database. Click on the Choose a consolidated database… button.

In this step of the wizard you need to specify the details of the consolidated database. This is very similar to a step that was taken in creating the synchronization model. When you click on the Choose a consolidated database… button it will take you to the authentication process shown in the following picture.

When you successfully complete the authentication process, the program begins checking the Mobilink System setup as shown in the next picture. If you have not already installed the MobiLink system tables into the consolidated database you will be prompted to do so.

After the check you will be taken back in an earlier screen to continue with the deployment step as shown in the next picture. Now all the relevant information for the consolidated database is available for the program.

{mospagebreak title=Creating the Directory}

Now click on the Next button in the above screen. You will get a Sybase Central message asking whether the indicated directory should be created as it does not exist, as shown in the next picture.

Click on the Yes button. This will take you to the next step of the deployment – creating a remote database deployment, as shown in the next picture.

There are three options in this window, two of which are related to creating either a new SQL Anywhere database or a new UltraLite database. The third option is to be chosen if there are existing SQL Anywhere or UltraLite databases. For this tutorial the default is accepted.

Clicking the Next button on the previous screen takes you to the next window, where you can either create a remote database, or create a file for creating a remote database later, consisting of a command file and a SQL script file for creating the remote database. Here both options are chosen. The remote folder is where these files will be saved; this folder does not exist as yet. If you want, you may choose to save these files to another location by using the Browse buttons.

When you click on the Next button, Sybase Central displays a message. Since a directory to store these files does not exist, the program offers to create a remote directory at the specified default location. Accept the default and click on the Yes button to step into the next stage.

{mospagebreak title=Creating the Mobilink User}

Click on the Yes button to open the ‘Mobilink User‘ step of the wizard where you can specify a username and password for the MobiLink user. For default Mobilink authentication the password can be optional. The same user name as was used for the database authentication was used, as shown in the next picture. This user is also registered in the consolidated database for MobiLink synchronization by placing a check mark (default) in the check box as shown. We will use ‘sa’ for the user name. In an actual deployment you will have a unique name for every user synchronizing with the database.

When you click on the Next button in the above screen, you will come to the window shown in the next picture.

Here you choose the Synchronization Stream Parameters, accept the defaults TCP/IP and Port: 2439 and click Next. You may also choose other options if your application/network permits.

{mospagebreak title=Choosing Client Stream Parameters}

This takes you to the next step of choosing Client Stream Parameters. It is basically the client host. In this case the machine Hodentek is the client host as shown in the next window. This screen comes up with the default client host name as shown. You may also type in additional parameters. For this tutorial the default was accepted and no additional parameters were specified.

Clicking on the Next button brings up the next window where the Mobilink Server Stream can have additional communication parameters specified. The default, which leaves this field empty, was accepted.

Clicking on the Next button brings up the window shown in the following picture where you choose the Verbosity for MobiLink Server settings. These settings define the quantity of information and the message logs displayed in the server window. The defaults shown in the screen are accepted. The message log file is ml.txt.

When you click on the Next button you will get to the screen shown in the next picture. Here you choose the options for the MobiLink Server; if needed you may give a name. You may also specify other command-line options if you want. The command file to start the Mobilink server, the Test10Sync_mlsrv.bat file, and its default location are also shown.

Again the defaults in the above screen were accepted. When you click on Next button, the Sybase Central message comes up advising you about the lack of a directory for the server file and asking whether you want it to be created.

When you click on the Yes button the directory will be created and the screen that shows up is for the "Verbosity For SQL Anywhere Remote Synchronization Client" settings. The default options were chosen as shown in the next picture. Please pay attention to the note regarding the verbosity and performance relationship.

When you click on the Next button, you come to a screen shown in the next picture, where you may choose many additional extended options for the client. These include additional command-line arguments for the synchronization client (dbmlsync) as well as the location for saving the file necessary to start the synchronization client.

{mospagebreak title=Final Screen}

When you click on the Next button it takes you to the final screen of the wizard. This step will create deployment files or write to the database. Any existing files will be overwritten if they have the same name.

When you click on the Finish button the deployment starts and shows a deployment processing window as shown in the next picture.

When the deployment is completed, it shows the completed status screen as shown in the next picture. The message may be copied for future reference.

In case of a problem during deployment the progress screen will show an error message which can be copied for trouble shooting.

Folders and Files created by the Deployment Synchronization Model Wizard

The folders created in the Test10Sync folder are shown in the next picture.

Contents of remote folder:

Contents of consolidated Folder:

Content of mlsrv Folder:

Summary

The MobiLink plug-in in SQL Anywhere 10 is a new tool added which simplifies what used to be a difficult script-based set up to configure in earlier versions. The interface is very user-friendly and the wizard steps are well documented.

One thought on “Deployment of the MobiLink Synchronization Model Wizard in SQL Anywhere 10

  1. This Part 2 of the MobiLink article completes the synchronization related SQL Anywhere 10 article. With the deployed remote database synchronization should be easy. A future article may look at deploying this on a database with a much smaller foot print on a hand held device.
    Thanks for reading the article. Looks forward to hearing from you. Jay

[gp-comments width="770" linklove="off" ]