Historical database

You follow these steps to create the dynamic database tables in the Historical database. The scripts are stored in a user-defined location. This location is defined during the setting of the Schema Generator configuration in the WebSphere® Business Monitor administrative console.

The Database Definition Language (DDL) scripts needed for creating the running database tables in the Historical database are stored in the datamart.ddl file on the root directory. To deploy the scripts, complete the following steps:
  1. Open the DB2® Command Window. On UNIX®, If the shell environment is configured, you can invoke the DB2 command line processor.
  2. Change the path to the location of the script file.
  3. Back up the Historical database before you deploy a new business measures model.
  4. Run the command db2 terminate. This ensures that any previous background processes which may be using a different code page value will not be used and that a new background process will be used to process this request.
  5. Set the DB2CODEPAGE environment variable to 1208. The DB2 command line processor will by default interpret any character data using the current code page. The generated datamart.ddl however contains UTF-8 characters that will be corrupted unless the DB2CODEPAGE environment variable is set to 1208.
    1. On the UNIX operating system.
      • Using sh, ksh, bash type shells, run the command export DB2CODEPAGE=1208.
      • Using csh, tsch type shells, run the command setenv DB2CODEPAGE 1208.
    2. On the Windows® operating system, run the command set DB2CODEPAGE=1208.
  6. Connect to the Historical database by running the command: db2 connect to <Historical_DB_Name>. This script runs without automatically committing the changes.
  7. Run the command db2 +c -stvf datamart.ddl > datamart.log. This runs the script and saves a log file that records the transactions for troubleshooting purposes. Check the log file for any errors before you commit or rollback. If a rollback is required, run the command: db2 rollback to undo the actions. If no errors occurred, run the command db2 commit to commit the changes.
  8. Disconnect from the Historical database after you run the script by running the command db2 disconnect <Historical_DB_Name>.
  9. Run the command db2 terminate to terminate the background processes.
Note: Under certain circumstances when running the datamart.ddl for a new version of an existing business measures model, you may see errors similar to the following: SQL0605W The index was not created because the index "WBI.I_1133789461307" already exists with the required description. SQLSTATE=01550. These errors can safely be ignored and you can commit the transaction, assuming no other errors occurred.
Related concepts
WebSphere Business Monitor databases
Related tasks
State database
Runtime database

Copyright IBM Corporation 2005. All Rights Reserved.