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: Simulating multiple MobiLink clients using the MobiLink Replay utility


Lesson 1: Setting up your MobiLink consolidated database

In this lesson, you set up your MobiLink consolidated database.


This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Simulating multiple MobiLink clients using the MobiLink Replay utility.

  1. Create a new working directory to store all the sample files created in this tutorial.

    This tutorial assumes the path c:\mlreplay.

  2. At a command prompt, change the working directory to c:\mlreplay.

    This tutorial assumes all commands are run from this directory.

  3. Run the following command to create a SQL Anywhere consolidated database named cons.db:

    dbinit -dba DBA,sql cons.db
  4. Run the following command to start the consolidated database:

    dbsrv16 cons.db
  5. Click Start » Programs » SQL Anywhere 16 » Administration Tools » ODBC Data Source Administrator.

  6. Click the User DSN tab, and click Add.

  7. In the Create New Data Source window, click SQL Anywhere 16 and click Finish.

  8. Perform the following tasks in the ODBC Configuration For SQL Anywhere window:

    1. Click the ODBC tab.

    2. In the Data source name field, type cons.

    3. Click the Login tab.

    4. In the User ID field, type DBA.

    5. In the Password field, type sql.

    6. From the Action dropdown list, choose Connect to a running database on this computer.

    7. In the Server name field, type cons.

    8. In the Database name field, type cons.

    9. Click OK.

  9. Close ODBC data source administrator.

    Click OK on the ODBC Data Source Administrator window.

  10. Connect to your consolidated database in Interactive SQL.

    Run the following command:

    dbisql -c "DSN=cons"
  11. Execute the following statement in Interactive SQL to create MobiLink system tables and stored procedures using the syncsa.sql setup script. Replace C:\Program Files\SQL Anywhere 16\ with the location of your SQL Anywhere 16 installation.

    READ "C:\Program Files\SQL Anywhere 16\MobiLink\setup\syncsa.sql";

    Interactive SQL applies syncsa.sql to your consolidated database.

    Running syncsa.sql creates a series of system tables and stored procedures prefixed with ml_. The MobiLink server works with these tables and stored procedures in the synchronization process.

  12. Execute the following SQL statement in Interactive SQL to create the T1 table:

        pk1     INTEGER,
        pk2     INTEGER,
        c1      VARCHAR(30000),
        PRIMARY KEY(pk1, pk2)

    Interactive SQL creates the T1 table in your consolidated database.

  13. Close Interactive SQL.


The consolidated database is set up.