Contents Index Setting up the CustDB consolidated database Setting up an UltraLite remote database

MobiLink Synchronization User's Guide
  The CustDB Sample Application
    Setup
      Setting up the CustDB consolidated database

Creating a consolidated database

The following procedures create a consolidated database for CustDB for each of the supported types of consolidated database.

For databases other than Adaptive Server Anywhere databases, you will first need to run a script to add the MobiLink system tables. This platform-specific script is located in the MobiLink\setup subdirectory of your SQL Anywhere 9 installation.

For more information about preparing a database for use as a consolidated database, see Setting up a consolidated database.

To set up a consolidated database (Adaptive Server Enterprise, Oracle or SQL Server)

  1. Create the consolidated database.

  2. Add the MobiLink system tables by running one of the following SQL scripts, located in the MobiLink\setup subdirectory of your SQL Anywhere 9 installation:

  3. Add tables to the CustDB database by running one of the following SQL scripts, located in the Samples\MobiLink\CustDB subdirectory of your SQL Anywhere 9 installation:

  4. Create an ODBC data source called CustDB that references your database on the client machine.

To set up a consolidated database (Adaptive Server Anywhere)

  1. Create the consolidated database:

    Navigate to the Samples\MobiLink\CustDB subdirectory of your SQL Anywhere 9 installation and run the following command line:

    dbinit consol.db
  2. Add tables to the CustDB database by running custdb.sql, located in the Samples\MobiLink\CustDB subdirectory of your SQL Anywhere 9 installation.

  3. Create an ODBC data source called CustDB that references your database on the client machine.

To set up a consolidated database (IBM DB2)

  1. Create a DB2 database on the DB2 server. Ensure that the default table space (usually called USERSPACE1) uses 9 Kb pages.

    If the default table space does not use 9 Kb pages, complete the following steps:

  2. Add the MobiLink system tables using the file MobiLink\setup\syncdb2long.sql. (If you are using a version of DB2 prior to 6.5, use syncdb2.sql.)

  3. Copy custdb2.class to the SQLLIB\FUNCTION directory on your DB2 server machine.

  4. Add tables to the CustDB database:

  5. Create an ODBC data source called CustDB that references the DB2 database on the DB2 client machine.

  6. Run the custdb2setuplong Java application on the DB2 client machine as follows. If you are using a version of DB2 prior to 6.5, use custdb2setup. This application resets the CustDB example in the DB2 database. After the initial setup, you can run this application at any time to reset the DB2 CustDB database by typing the same command line.


Contents Index Setting up the CustDB consolidated database Setting up an UltraLite remote database