Setting up the TBC relational data source

The relational data source for the standard sample application is TBC.

Note:
To create a database, you must have database administrator or similar access privileges required by the RDBMS that you are using.

To set up TBC relational data source:

  1. Create the TBC database using an RDBMS.

    For more information, see Creating the TBC database.

  2. Create tables for the TBC database by running SQL scripts.

    For instructions, see Creating tables for the TBC database.

  3. Load data into the TBC database by running SQL scripts.

    For instructions, see Loading data into the TBC tables.

Creating the TBC database

Create the TBC database in the same way that you create any database using an RDBMS:

CAUTION:
The user TBC must create the tables for the TBC database, or portions of the standard sample application will not work.

Creating tables for the TBC database

Create tables for the TBC database with the same utility program that you typically use to create tables by running SQL scripts.

The standard sample application SQL scripts needed to create tables for the TBC database are in the samples\tbcdbase directory where you installed DB2 OLAP Integration Server.

The utilities listed in Table 23 have been tested to work with the SQL scripts:

Table 23. Tested Utilities for Creating TBC Tables
Database SQL Script Utility Program
DB2 tbc_create_db2.sql tbc_drop_db2.sql DB2 Command Window or >DB2 -tvf
Informix tbc_create_informix.sql tbc_drop_informix.sql DBAccess
MS SQL Server tbc_create_sqlsrv.sql tbc_drop_sqlsrv.sql Query Analyzer (MS SQL Server 7.0 and 2000)
Oracle tbc_create_oracle.sql tbc_drop_oracle.sql
  • SQL*Plus
  • SQL*Loader command line utility
Sybase tbc_create_sybase.sql tbc_drop_sybase.sql ISQL
Teradata tbc_create_teradata.sql tbc_drop_teradata.sql BTEQ

Each RDBMS has two scripts. The first script builds tables and the other drops tables.

CAUTION:
You must create the tables for the TBC database as user TBC, or portions of the standard sample application will not work.

To create tables for the TBC database:

  1. Start the utility program.
  2. Connect to the TBC database as user TBC.
    Note:
    Use lowercase tbc for Informix; use uppercase TBC for Sybase and SQL Server.
  3. In the samples\tbcdbase directory, open the appropriate SQL script file.
  4. Run the SQL script.

    MS-SQL Server: You should receive a message that you did not create data or rows. This message is normal because you created only tables and columns.

    Informix: If you run the Informix SQL script (tbc_create_informix.sql) more than once, you must first run tbc_drop_informix.sql to drop tables before you build them again.

  5. Verify that you have created the TBC tables; for example, type
    SELECT * FROM PRODUCTDIM 

    Alternatively, you can start the RDBMS and verify that the TBC database has the new tables.

  6. Close the utility program.

Loading data into the TBC tables

Load data into the TBC tables by running an SQL script using the same utility program that you typically use to load tables by running SQL scripts.

The utilities listed in Table 24 have been tested to work with SQL scripts.

Table 24. Tested Utilities for Loading Data into TBC Tables
Database SQL Script Utility Program
DB2 sampledata.sql DB2 Command Window or >DB2 -tvf
Informix sampledata.sql DBAccess
MS SQL Server sampledata.sql Query Analyzer (MS SQL Server 7.0 and 2000)
Oracle sampledata.sql SQL*Plus
Sybase sampledata.sql ISQL
Teradata sampledata.sql BTEQ

To load data into the TBC tables:

  1. From the command line, move to the samples\tbcdbase directory where you installed Integration Server.
  2. Start the utility program.
  3. Connect to the TBC database as user TBC.
  4. In the sample\tbcdbase directory, open the sampledata.sql script file.
  5. Run the SQL script using your RDBMS tool.
  6. Verify that you have loaded data into the TBC tables; for example, type
    SELECT * FROM TBC.PRODUCT 

    Alternatively, you can start the RDBMS and execute a query.

  7. Close the utility program.