1 IBM DB2 Database Plug-in Overview and Prerequisites

This chapter describes the system monitoring plug-in for IBM DB2 Database and provides a list of available features. Review the summary of prerequisites required before configuring IBM DB2 Database for monitoring by Oracle Enterprise Manager.

The following topics are provided:

IBM DB2 Database Plug-in Overview and Feature Summary

The System Monitoring Plug-in for IBM DB2 Database extends Enterprise Manager to add support for managing IBM DB2 Universal Database (UDB) for Linux, UNIX, and Windows (LUW) database instances. By deploying the plug-in in your Enterprise Manager environment, you gain the following management features:

  • Monitor DB2 Database instances.

  • Gather configuration data and track configuration changes for DB2 database instances.

  • Raise alerts and violations based on thresholds set on monitored targets and configuration data.

  • Provide rich, out-of-box reports based on the gathered data.

  • Support monitoring by a remote Agent. Local Agent is an agent running on the same host as the DB2 database. Remote Agent is an agent running on a host that is different from the host where DB2 database is running.

  • Collect and display top SQL statements and their related statistics, including CPU Time and Execution Count, of your IBM DB2 Database.

  • Collect and display information regarding the top Lock Wait Events in IBM DB2, including top Wait Count by Table and top Wait Times.

  • Utilization of Enterprise Manager jobs to start and stop the IBM DB2 database. These jobs are not only accessible from the Enterprise Manager Jobs Library but also from the IBM DB2 plug-in's UI home page.

  • Expose vital IBM DB2 Database metrics in the form of easy-to-use charts and tables.

Platforms Supported

The plug-in supports monitoring of IBM DB2 Universal Database (LUW) on all the platforms where IBM DB2 Universal Database can be installed.

Supported Versions

The IBM DB2 Database plug-in supports the following versions of products:

  • Enterprise Manager 24ai:

    • The plug-in is certified for the latest release of Oracle Enterprise Manager and higher (Oracle Management Server (OMS) and Oracle Management Agent).

  • Version 9.1, 9.5, 9.7, 10.1, and 10.5 of single-partition IBM DB2 Universal Database (UDB) for Linux, UNIX, and Windows (LUW).

  • IBM DB2 configured for High Availability and Disaster Recovery (HADR).

IBM DB2 Database Plug-in Prerequisites

The following prerequisites must be met before you can use the plug-in:

  1. Install the following:
    • Enterprise Manager (Oracle Management Service and Oracle Management Agent).

    • Install the Inventory and Usage Patch (20692416), available from My Oracle Support (https://support.oracle.com).

    • IBM DB2 Universal JDBC Type 4 driver for IBM DB2 Database (see Setting Up the JDBC Driver)

    • IBM DB2 Universal Database

  2. Create a suitable operating system user to access the table functions used in IBM DB2. For information about creating a user, see Using a Suitable Operating System User and Assigning Authorities and Privileges.
  3. To avoid metric collection errors for Database Monitoring metrics, create the table STMG_DBSIZE_INFO. For more information, see Configurations Required for Avoiding Metric Collection Errors for Database Monitoring Metrics.
  4. To configure your Management Agent to generate alerts using the IBM DB2 Diagnostic Log file (db2diag.log), then do the following:
    • Define your match patterns in the Diag_log_file_match_pattern_file.txt file that is present in $ORACLE_HOME/plugins/oracle.em.sidb/scripts/emx/ibm_db2_database/.

    • Define your ignore patterns in the Diag_log_file_no_match_pattern_file.txt file that is present in $ORACLE_HOME/plugins/oracle.em.sidb/scripts/emx/ibm_db2_database/.

    • Set the DIAG_PATH configuration parameter of the database manager (instance) to correspond to the monitored IBM DB2 database.

    • For performance reasons, you should set a maximum diagnostic log file size of 100 MB when this metric is enabled. You can set the maximum file size using the command:

      db2 update dbm cfg using diagsize 100

    Based on the patterns defined in the two files, the System Monitoring Plug-in for IBM DB2 parses the Diagnostic Log file and generates alerts for the satisfied conditions. First, the plug-in validates the two files to see if any patterns are defined. If no patterns are defined, then the plug-in does not parse the Diagnostic Log file. If matching patterns are not defined, but ignore patterns are defined, then the plug-in parses every entry in the Diagnostic Log file and checks if ignore patterns are satisfied. If matching patterns are also defined, then the plug-in first parses only those entries that satisfy the matching patterns, and then for those satisfied entries, the plug-in checks if ignore patterns are satisfied.

    Also, if multiple log entries having the same function name are encountered in a collection, then only one alert is generated to represent the function name. This alert is based on the last log entry with a common function name, present in the Diagnostic Log file.

    Note:

    This feature is supported only for local monitoring, that is, when the IBM DB2 database on a host is monitored by an Oracle Management Agent that is running on the same host.

  5. In the IBM DB2 Database SQL Statement Performance and IBM DB2 Database Applications Lock Performance reports and the Agent Monitoring metric, in order to see the SQL statement text along with the application name, enable the instance configuration parameter DFT_MON_STMT. Otherwise, you may not see any data in the column.
  6. As part of JDBC URL, either IP Address or host name can be provided. Ensure that the host name can be resolved consistently on the network. Standard TCP tools such as "nslookup" and "traceroute" can be used to verify the host name. Validate using the following commands on Management Agent where plug-in is deployed:
    • nslookup <host name>

      This returns the IP address and fully qualified host name.

    • nslookup <IP>

      This returns the IP address and fully qualified host name.

Setting Up the JDBC Driver

The JDBC driver is available from IBM, and consists of the following files that the Agent must be able to access:

  • db2jcc.jar

  • db2jcc_license_cu.jar

To set up the AGENT_BASE_DIR directory for the IBM DB2 Universal Type 4 JDBC driver:

  1. If it does not already exist, create the directory $AGENT_BASE_DIR/plugins/dependencies/oracle.em.sidb/jdbcdriver/.
  2. Copy the three JDBC driver files into the directory $AGENT_BASE_DIR/plugins/dependencies/oracle.em.sidb/jdbcdriver/.

Note:

If you do not have access to or cannot find your db2jcc.jar driver, you can download a copy of it from IBM's support site:

http://www-01.ibm.com/support/docview.wss?uid=swg21363866

Deploying the Plug-in

You can deploy the plug-in to an Oracle Management Service instance using the Enterprise Manager console, or using the Enterprise Manager Command-Line Interface (EMCLI). While the console enables you to deploy one plug-in at a time, the command line interface mode enables you to deploy multiple plug-ins at a time, thus saving plug-in deployment time and downtime, if applicable.

See the Managing Plug-ins chapter in the Oracle Enterprise Manager Administrator's Guide for instructions on deploying the plug-in.

Upgrading the Plug-in

The Self Update feature allows you to expand Enterprise Manager's capabilities by updating Enterprise Manager components whenever new or updated features become available. Updated plug-ins are made available via the Enterprise Manager Store, an external site that is periodically checked by Enterprise Manager to obtain information about updates ready for download. See the Updating Enterprise Manager chapter in the Oracle Enterprise Manager Administrator's Guide for steps to update the plug-in.

Undeploying the Plug-in

See the Managing Plug-ins chapter in the Oracle Enterprise Manager Administrator's Guide for steps to undeploy the plug-in.