Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
The CustDB consolidated database can be any MobiLink supported consolidated database.
A SQL Anywhere CustDB consolidated database is provided in samples-dir\UltraLite\CustDB\custdb.db. A DSN called SQL Anywhere 11 CustDB is included with your installation.
You can rebuild this database using the file samples-dir\UltraLite\CustDB\newdb.bat.
If you want to explore the way the CustDB sample is created, you can view the file samples-dir\MobiLink\CustDB\syncsa.sql.
The following SQL scripts are provided in samples-dir\MobiLink\CustDB to build the CustDB consolidated database as any one of these supported RDBMSs:
|RDBMS||Custdb setup script|
|Adaptive Server Enterprise||custase.sql|
The following procedures create a CustDB consolidated database for each of the supported RDBMS.
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, DB2 LUW, MySQL, Oracle, SQL Server)
Create a database in your RDBMS.
Add the MobiLink system tables by running one of the following SQL scripts, located in the MobiLink\setup subdirectory of your SQL Anywhere 11 installation:
Add sample user tables to the CustDB database by running one of the following SQL scripts, located in samples-dir\MobiLink\CustDB:
Create an ODBC data source called CustDB that references your database on the client machine.
To set up a consolidated database (DB2 LUW)
Create a consolidated database on the DB2 LUW server. For the purposes of this tutorial, call it CustDB.
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:
For more information, consult your DB2 LUW documentation.
Add the MobiLink system tables to the DB2 LUW consolidated database using the file MobiLink\setup\syncdb2.sql:
connect to CustDB user userid using password ~
db2 -c -ec -td~ +s -v -f syncdb2.sql
Copy custdb2.class, located in the Samples\MobiLink\CustDB subdirectory of your SQL Anywhere installation, to the SQLLIB\FUNCTION directory on your DB2 LUW server. This class contains procedures used for the CustDB sample.
Add data tables to the CustDB database:
connect to CustDB user userid using password
db2 -c -ec -td~ +s -v -f custdb2.sql
Create an ODBC data source called CustDB that references the DB2 LUW database on the DB2 LUW client.
From the Start menu, choose Programs » SQL Anywhere 11 » ODBC Administrator.
The ODBC Data Source Administrator appears.
The Create New Data Source window appears.
For information about how to configure your ODBC driver, see:
Run the custdb2setuplong Java application on the DB2 LUW client as follows. This application resets the CustDB example in the database. After the initial setup, you can run this application at any time to reset the CustDB database by typing the same command line.
javac -g -classpath %db2tempdir%\java\jdk\lib\classes.zip; %db2tempdir%\java\db2java.zip; %db2tempdir%\java\runtime.zip custdb2setuplong.java
java custdb2setuplong userid password
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|