Configuring the database schema
Configuring the database schema involves running the appropriate audit or reporting mode SQL scripts for the target database. The scripts provided in the audit and reporting mode libraries are designed to cover general use cases. You will probably need to modify them to work with your database settings or to suit your particular requirements.
The audit and reporting mode SQL scripts create all the database schema objects required to store
data processed by the gateway, including the tablespace, temporary tablespace, reporter, tables
(status, journal, and details), indexes,
constraints, triggers and views.
Use either the audit mode scripts or the reporting mode scripts to create the database schema objects, as required. See Audit mode and reporting mode for details of how the gateway operates in each mode.
After configuring the database schema, it is important to perform regular housekeeping tasks on the database tables. Perform regular maintenance procedures on the tables to maintain the tables at a manageable size. You may apply table partitioning where needed, and purge the table of old event data once the data has been consumed. The performance of the gateway transactions may be impacted if the database tables grow to extremely large sizes.
Running the scripts
The installed scripts are located in subdirectories of the $OMNIHOME/gates/jdbc2/scripts/audit and $OMNIHOME/gates/jdbc2/scripts/reporting directories, named for the target database that they configure. For example, the scripts for IBM® DB2® are located in the $OMNIHOME/gates/jdbc2/scripts/audit/db2 and $OMNIHOME/gates/jdbc2/scripts/reporting/db2 subdirectories.
The Reporting scripts are generally divided into two scripts, one to provision the primary Reporting tables (which are updated directly by the gateway) and the other for provisioning the secondary Reporting audit tables (which are updated by triggers). The secondary Reporting audit tables are intended to provide event summary reports for use with Tivoli Common Reporting or Cognos. These tables may not be provisioned if the event data is not used with Tivoli Common Reporting or Cognos.
Before running the scripts, you should consult your database documentation for instructions about how your database uses SQL scripts. You should also refer to the readme files in the script libraries and the comments in the script files for details of any limitations or constraints specific to individual scripts.