You follow these steps to create dynamic database tables in the
State 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) script needed for creating
the dynamic database tables in the State database is stored in the state.ddl file
on the root directory. To deploy the scripts, complete the following steps:
- Open the DB2® Command Window. On UNIX®,
If the shell environment is configured, you can invoke the DB2 command line
processor.
- Change the path to the location of the script file.
- Back up the State database before you deploy a new business measures model.
- 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.
- 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 state.ddl however contains UTF-8 characters
that will be corrupted unless the DB2CODEPAGE environment variable is set
to 1208.
- On the UNIX operating system.
- Usingsh, ksh, bash type shells, run the command export
DB2CODEPAGE=1208.
- Using csh, tsch type shells, run the command setenv
DB2CODEPAGE 1208.
- On the Windows® operating system, run the command set
DB2CODEPAGE=1208.
- Connect to the State database by running the command db2
connect to <State_DB_Name>.
- Run the command db2 +c –stvf state.ddl > state.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 decide to 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.
- Disconnect from the State database after running the script with
the command db2 disconnect <State_DB_Name>.
- Run the command db2 terminate to terminate the background
processes.