Configuring MONITOR database scripts manually

The database scripts required for creating the MONITOR database are shipped on the installation media and are copied to the application server during IBM® Business Monitor server installation. These database scripts can be customized manually so that you can create the databases before server installation or profile creation.

Procedure

To edit the database script files manually, complete the following steps:

  1. Using a text editor, open the database script files for your database software.

    The scripts create the databases and required tables for IBM Business Monitor.

    • For DB2® for z/OS®:
      • createDatabase_Monitor.sql
      • createTablespace_Monitor.sql
      • createTable_Monitor.sql
    • For all other databases:
      • createDatabase.sql
      • createTables.sql
    By default, the files are located in the following directories:
    • (distributed only) DVD_root/scripts/database/Monitor/platform
    • app_server_root/dbscripts/Monitor
    • app_server_root/profiles/profile_name/dbscripts/Monitor (stand-alone)
    • app_server_root/profiles/profile_name/dbscripts.wbm (deployment manager)
    where
    • DVD_root is the directory where you extracted the DVD or downloadable image
    • platform is the operating system of the database (for example DB2, Oracle, or SQL Server)
    • app_server_root is the directory where IBM Business Monitor is installed
  2. Edit the following variables in the database script files for your database software:
    • For DB2, edit the following variables:
      @DB_NAME@
      Represents the name of the IBM Business Monitor database (for example, MONITOR).
      @SCHEMA@
      Represents the name of the IBM Business Monitor schema (for example, MONITOR).
      @DB_USER@
      Represents the runtime IBM Business Monitor database user.
    • For DB2 for z/OS, edit the following variables:
      @STOGRP@
      Represents the DB2 storage group name (for example, SYSDEFLT).
      @DB_NAME@
      Represents the name of the IBM Business Monitor database.
      @SCHEMA@
      Represents the name of the IBM Business Monitor schema qualifier.
      @DB_USER@
      Represents the runtime IBM Business Monitor database user.
    • For SQL Server, edit the following variables:
      @DB_NAME@
      Represents the name of the IBM Business Monitor database (for example, MONITOR).
      @SCHEMA@
      Represents the name of the IBM Business Monitor schema (for example, MONITOR).
      @DB_USER@
      Represents the runtime IBM Business Monitor database user.
      @DB_PASSWORD@
      Represents the password of the runtime IBM Business Monitor database user. You can create the database user and password before running the script, or you can design the script to create the database user and password for you. If the script will create the database user and password, you must specify @DB_PASSWORD@ in the script.
    • For Oracle, edit the following variables:
      @SCHEMA@
      Represents the name of the database user that owns the IBM Business Monitor database tables.
      @DB_PASSWORD@
      Represents the password for the database user identified by $SCHEMA$.
      @TSDIR@
      Represents the table space directory.
      If @TSDIR@ is omitted from the data file specification of a table space, the data file is created in the database manager directory. If a fully qualified path is specified for @TSDIR@, the directory must exist before you invoke this script.
      @DB_USER@
      Represents the runtime IBM Business Monitor database user.
      The table spaces are created in the createDatabase.sql file. If you decide to replace the default table space names with your own table space names, when models are deployed you must export the model schema scripts and modify them to refer to your chosen table space names.
      Important: If you are configuring an additional monitoring instance in one Oracle installation, you must also replace the string DEFAULTTS in createDatabase.sql with a unique identifier for this additional monitoring instance in the following four lines:
      CREATE TABLESPACE MONDSTS
        DATAFILE 'DEFAULTTS_MONDSTS.dbf' SIZE 500M AUTOEXTEND ON
      NEXT 100M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONDMSTS
        DATAFILE 'DEFAULTTS_MONDMSTS.dbf' SIZE 100M AUTOEXTEND ON
      NEXT 20M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONIDXTS
        DATAFILE 'DEFAULTTS_MONIDXTS.dbf' SIZE 250M AUTOEXTEND ON
      NEXT 50M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONLOBTS
        DATAFILE 'DEFAULTTS_MONLOBTS.dbf' SIZE 200M AUTOEXTEND ON
      NEXT 40M MAXSIZE UNLIMITED LOGGING; ;
      For example, if the unique identifier of the additional monitoring instance was MONDEV1_MONDSTS, the edited lines would look like this:
      CREATE TABLESPACE MONDSTS
         DATAFILE 'MONDEV1_MONDSTS.dbf' SIZE 500M AUTOEXTEND ON
      NEXT 100M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONDMSTS
         DATAFILE 'MONDEV1_MONDMSTS.dbf' SIZE 100M AUTOEXTEND ON
      NEXT 20M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONIDXTS
         DATAFILE 'MONDEV1_MONIDXTS.dbf' SIZE 250M AUTOEXTEND ON
      NEXT 50M MAXSIZE UNLIMITED LOGGING;
      
      CREATE TABLESPACE MONLOBTS
         DATAFILE 'MONDEV1_MONLOBTS.dbf' SIZE 200M AUTOEXTEND ON
      NEXT 40M MAXSIZE UNLIMITED LOGGING;
      Repeat this procedure for each additional monitoring instance.
      Note: Version 6.2 of IBM Business Monitor used different table spaces from previous versions. This means that if you are using Oracle and intend to deploy a 6.1 model to IBM Business Monitor 8.5.6, you must choose one of the following options:
      • Run the 6.1 table space statements during the installation of the 8.5.6 database.
      • When you deploy a monitor model, export the model database script and manually change the table space references to point to the 7.0 table space names. If you choose the second option, you must do this each time you deploy a 6.1 model to the 7.0 server.
      A simple way to avoid this issue is to migrate from 6.1 to 8.5.6 with existing models deployed, and then generate new models in 6.2 or 8.5.6 IBM Business Monitor development toolkit.
      The map of table space names is shown in the table below.
      Table 1. Map of table space names from previous versions of IBM Business Monitor
      Current Table Space 6.1.x Table Space
      MONDSTS INSTANCE
      MONDMSTS DMSTS
      MONIDXTS INDEXTS
      MONLOBTS LOBTS
  3. Save and close the file.