Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » 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.

 Set up your MobiLink consolidated database
  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 cons.db
  4. Run the following command to start the consolidated database:

    dbeng12 cons.db
  5. Click Start » Programs » SQL Anywhere 12 » 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 12 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 12\ with the location of your SQL Anywhere 12 installation.

    READ "C:\Program Files\SQL Anywhere 12\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.

  14. Proceed to Lesson 2: Creating a MobiLink project.