IBM Support

IT28809: DB2 ACTIVITIES EVENT MONITOR MIGHT REPORT INCORRECT METRICS IN ACTIVITIES TABLE FOR BATCHED STATEMENTS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Query metrics captured by event monitor for activities will
    report cumulative values in activities table for statements
    executed as batch (via executeBatch).
    For example, with multiple inserts executed as a single batch:
    
    PreparedStatement pstmt = c.prepareStatement("insert into
    mytable values (?,?)");
    for(int i=0;i<5;i++)
    {
        pstmt.setInt(1,i);
        pstmt.setString(2,String.valueOf(i));
        pstmt.addBatch();
    }
    pstmt.executeBatch();
    
    activities table will report cumulative values for e.g.
    ROWS_MODIFIED in ACTIVITIES table. Values in the ACTIVITYMETRICS
    will be captured correctly, see an example below:
    
    select
        substr(a.appl_id,1,30) as appl_id
        , a.uow_id
        , a.activity_id
        , a.rows_modified
        , a.user_cpu_time
        , m.rows_modified
        , substr(s.stmt_text,1,20) as stmt_text
    from
        activity as a
        , activitymetrics as m
        , activitystmt as s
    where
        a.appl_id     = m.appl_id
        and a.uow_id      = m.uow_id
        and a.activity_id = m.activity_id
        and a.appl_id     = s.appl_id
        and a.uow_id      = s.uow_id
        and a.activity_id = s.activity_id
    order by
        a.time_completed asc "
    
    APPL_ID         . UOW_ID  ACT_ID ROWS_MOD  USER_CPU_T ROWS_MOD
    STMT_TEXT
    ----------------. ------- ------ -------- ----------  ---------
    -----------
    127.0.0.1.58006..       2      1        1         81          1
    insert into
    127.0.0.1.58006..       2      2        2        135          1
    insert into
    127.0.0.1.58006..       2      3        3        172          1
    insert into
    127.0.0.1.58006..       2      4        4        199          1
    insert into
    127.0.0.1.58006..       2      5        5        225          1
    insert into
    
    Note:
    Metrics in activities will be propagated only with the legacy
    statement monitor enabled (update monitor switches using
    statement on)
    

Local fix

  • Use the values from the ACTIVITYMETRICS table
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Db2 11.1.4.5 or higher                            *
    ****************************************************************
    

Problem conclusion

  • Upgrade to Db2 11.1.4.5 or higher
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT28809

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2019-04-16

  • Closed date

    2020-01-18

  • Last modified date

    2020-01-18

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
18 January 2020