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 technology » CustDB sample for MobiLink » CustDB files » CustDB consolidated database setup

 

Building CustDB as a consolidated database (DB2 LUW)

Use this procedure to set up a DB2 LUW consolidated database.

Prérequis

There are no prerequisites for this task.

 Task
  1. Create a consolidated database on the DB2 LUW server named CustDB.

  2. Ensure that the default table space (usually called USERSPACE1) uses 8 KB pages.

    If the default table space does not use 8 KB pages, complete the following steps:

    1. Verify that at least one of your buffer pools has 8 KB pages. If not, create a buffer pool with 8 KB pages.

    2. Create a new table space and temporary table space with 8 KB pages.

      For more information, consult your DB2 LUW documentation.

  3. Add the MobiLink system objects to the DB2 LUW consolidated database using the file MobiLink\setup\syncdb2.sql:

    1. Change the connect command at the top of the file syncdb2.sql. Replace DB2Database with the name of your database (or its alias). In this example, the database is called CustDB. You can also add your DB2 user name and password as follows:

      connect to CustDB user userid using password ~
    2. Open a DB2 LUW Command Window on either the server or client computer. Run syncdb2.sql by typing the following command:

      db2cmd db2 -c -ec -td~ +s -v -f syncdb2.sql
  4. Add data tables, stored procedures and MobiLink synchronization scripts to the CustDB database:

    1. If necessary, change the connect command in custdb2.sql. For example, you could add the user name and password as follows. Replace userid and password with your user name and password.

      connect to CustDB user userid using password
    2. Open a DB2 Command Window on either the server or client computer.

    3. Run custdb2.sql by typing the following command:

      db2cmd db2 -c -ec -td~ +s -v -f custdb2.sql
    4. When processing is complete, enter the following command to close the command window:

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

    1. Start the ODBC Data Source Administrator:

      Choose Start » Programs » SQL Anywhere 16 » Administration Tools » ODBC Data Source Administrator.

      The ODBC Data Source Administrator appears.

    2. On the User DSN tab, click Add.

    3. In the Create New Data Source window, select the ODBC driver for your DB2 LUW database. For example, choose IBM DB2 UDB ODBC Driver. Click Finish.

      For information about how to configure your ODBC driver, see:

Résultat

The DB2 LUW consolidated database is set up.

 See also