Adding or removing date dimension values

The MONITOR database includes a date dimension table containing dates in the range January 1, 2008 through December 31, 2022. You can manually add or remove dates in this table using database scripts provided by IBM® Business Monitor.

About this task

For the purpose of dimensional analysis, date-based metrics are automatically joined with the MONITOR database date-dimension table, DIM TIME. This ensures that there will be no gaps in the dates as you "drill down" on a date dimension and examine details at the year, month, and day levels. To accomplish this, the database date-dimension table, DIM TIME, is populated at the time of IBM Business Monitor product installation with dates from January 1, 2008 through December 31, 2022.

When an instance has a metric value not represented in the database date-dimension table (for example, a value before 2008 or after 2022), then, consequently, this instance will not be included in any dimension or report query. To include instances with dates outside of the existing date values in dimensional analysis, those dates must be added to the database date-dimension table. The dimension date values are cached in server memory, so you might want to remove unneeded past or future dates from the database date-dimension table DIM_TIME to decrease server memory use and improve dimensional analysis performance.

Database scripts have been included in the IBM Business Monitor installation to easily change the date range in the DIM_TIME table. These scripts, by default, remove all existing entries and create fifteen years of entries from 2008 through 2022. Alter the scripts to include the date ranges required by the existing or projected set of instance data.

To add new dates to the database date-dimension table, DIM_TIME, use the dim_time_entries scripts located in the dbscripts/Monitor/platform directory (for example, for DB2: Monitor_install_dir/dbscripts/Monitor/DB2/dim_time_entries_db2.ddl). Complete the following steps:

Procedure

  1. In a text editor, open the SQL script.
    Note: Each database-specific script contains instructions for altering the date range to be created in the DIM_TIME table.
  2. Update the appropriate entries with the new dates.
  3. Run the database-specific dim_time_entries ddl.

    The following scripts are included:

    • DB2 - dim_time_entries_db2.sql
    • DB2 for zOS - dim_time_entries_db2_zos.sql
    • Oracle- dim_time_entries_oracle.sql
    • Microsoft SQL Server - dim_time_entries_sqlserver.sql