Collecting MustGather data for IBM Db2 issues

Prepare the following MustGather information before you call HCL Support to help with IBM Db2 issues.

About this task

IBM DB2 database slow-downs may be caused by various factors. Before troubleshooting, review the article Troubleshooting a performance slowdown - DB2 side. The article will aid you in identifying and resolving the problem using the following steps.
  1. When troubleshooting a performance slow-down where DB2 is a suspect, start from the application server layer and review the webcontainer activities using javacores. Verify that there are indeed threads waiting on DB2. Otherwise, the problem is elsewhere.
  2. Once you identified a possible DB2 issue, move to the database and collect the number of DB2 connections and their state. Depending on what’s normal for the environment, it may lead to the bottleneck of a performance problem.
  3. Examine what queries are being executed; and review key metrics such as the frequency of execution, elapsed time and number of rows read. These values may expose room for tuning queries, for instance.
  4. The article Troubleshooting a performance slowdown - DB2 side also provides a solution to review your findings using MON_GET_PKG_CACHE_STMT to confirm your findings. This is equivalent to snapshots for dynamic-sql providing cumulative statistics for all running SQLs.

Collecting data for IBM Db2

Procedure

  1. Configure your environment.
    Note: This section requires the use of stored procedures.

    Follow the instructions below to configure your environment to capture the required diagnostic information:

    1. Prepare the server to collect javacores using the MustGather: Performance, hang, or high CPU issues with WebSphere Application Server.
    2. Download the db2collect.sh script.
  2. Reproduce the problem.
    1. Take note of the specific steps used to reproduce the problem and include any details that may be relevant to the problem.
    2. Make sure you you are experiencing the performance problem prior to start collecting data.
    3. Run the data collector script using the dba user account.

       ./db2collect.sh DBNAME
    Note: The script will run five iterations of data collection separated by an interval of three minutes. Once the data is collected, it will be available in a zip file named db2collect.date-and-time.zip (for example, db2collect.2015-07-01-13.12.28.zip).
  3. Collect data.
    Extract the db2collect.date-and-time.zip generated during the time of the performance problem. The file will be located in the same path as the db2collect.sh script. Optionally, you can use the WebSphere Commerce DB2 Report tool to review the data.

    Include the general information requested in MustGather: General Issues in WebSphere Commerce.