What is Log Master for DB2 Row Completion and why is it necessary?

Version 1
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Log Master for DB2



    QUESTION:

    What is Log Master for DB2 Row Completion and why is it necessary?


    ANSWER:

    Unless Data Capture Changes (DCC) is defined on an object, for UPDATES, DB2 only logs the first changed byte to the end of the row in most cases so UPDATE Log Records are often incomplete. There are exceptions such as when a row gets relocated due to increases in size but for the most part Update Log records are only partial row images.
    As a result, ROW Completion becomes necessary when Log Master is trying to process log records so it can fill in the missing pieces of the row.

    DB2 log records for insert and delete actions contain a complete image of the table row. DB2 log records for update actions might not contain a complete image. Unless the table is defined with Data Capture Changes (DCC), the update log records might contain only part of the table row (enough to include all of the changed data).

    Log Master needs complete row images to produce complete output. If a table is not defined with DCC, the product must perform row completion processing to obtain the complete image of each update action.

    Log Master uses the following sources to complete log records:
    — The current table space
    — Image copies
    — Other DB2 log records (for example, insert or delete actions of the same table row)

    Log Master uses record IDs (RIDs) to perform row completion processing.

    To produce complete output, row completion processing requires additional time and resources.

    Jobs that perform row completion processing usually read more log than they would without row completion; sometimes much more log. These jobs can also mount and read image copies.

    Events that change the locations of rows, such as database reorganization or load actions, can assign different rows to existing record ID (RID) values and affect how Log Master performs row completion processing.

    To reduce row completion processing:
    — Define your tables with DCC
    — Create image copies more frequently

    Definition of row completion processing
    Row completion processing is the work that Log Master performs to obtain a complete image of the table row involved in an update action.

    For an insert or delete action, the DB2 log record contains a complete row image so no row completion processing is required. For an update action, the DB2 log record contains a completerow image if the table is defined with DCC. If the table is not defined with DCC, the log record might not contain a complete row image. Log Master must then examine sources beyond the log records selected by your log scan to construct a complete image of the row at the time of the update.

    Without DCC, the log record of an update action can contain only the part of the table row that includes changed data.
    This changed data starts with the first changed byte, and ends with either the last changed byte or the last byte in the row. The changed data does not correspond to the columns in the row; it can start in the middle of one column or end in the middle of another.

    Log Master performs row completion processing when it takes any of the following actions on the log records of DB2 objects that were not defined with the DCC attribute:
    ■ Selecting any log records based on column value
    ■ Generating SQL output files
    ■ Generating load output files
    ■ Generating logical log output files
    ■ Generating Audit, Backout Integrity, Catalog Activity, Detail, or Drop Recovery reports
    Other actions (other types of reports) do not require row completion processing.

    Log Master frequently uses image copies for row completion processing, and to obtain compression dictionaries.
    When Log Master requires image copies, it attempts to read the different types of image copies in the following order: local primary (LP), local backup (LB), remote primary (RP), remote backup (RB).

    Consider running regular jobs to update the Repository with copies of compression dictionaries. This action does not reduce row completion processing, but it can improve performance by enabling Log Master to avoid mounting image
    copies to retrieve dictionaries to process log records of compressed table spaces.


     


    Article Number:

    000141841


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles