Log apply control options
This topic describes the options that REORG PLUS provides to allow you to control the log apply process during the reorganization.
You control the log apply process by changing any one of the values for the options that REORG PLUS uses in the LOGAPPLY phase. In addition to the options that change execution, REORG PLUS provides the DISPLAY option to monitor the process. The following table lists these options:
Option | Description |
---|---|
DEADLINE | DEADLINE specifies the time by which the LOGFINAL phase should finish applying log records. If REORG PLUS determines that the LOGFINAL phase will not finish by the deadline, it terminates the reorganization. When calculating the estimate, REORG PLUS does not include the time required to produce incremental copy data sets (if creating them) or the time needed for the UTILTERM phase. REORG PLUS does not check the DEADLINE value until the LOGAPPLY phase begins. If a timestamp or time value is specified on DEADLINE and LOGFINAL, the calculated LOGFINAL timestamp must be earlier than the calculated DEADLINE timestamp. You can specify NONE to indicate that there is no deadline. |
DELAY | DELAY specifies the number of seconds that are to elapse from the time that REORG PLUS detects a longlog condition until it performs the action that is specified on the LONGLOG option. Setting this option to a large number gives you time to make decisions regarding a course of action when a longlog condition is detected. After you decide what value to set for LONGLOG, you can also change DELAY to a smaller number to make that action happen sooner. |
LOGFINAL | The LOGFINAL timestamp value specifies when REORG PLUS is to start the LOGFINAL phase. If you specify NONE, the other options control the start of the phase. |
LOGTHRESHLD | LOGTHRESHLD specifies the number of log records that REORG PLUS uses as the threshold to use to begin the LOGFINAL phase. This phase begins when REORG PLUS determines that the number of log records remaining to be applied is less than or equal to the threshold value. |
LONGLOG | LONGLOG tells REORG PLUS what action to take after it detects a longlog condition that lasts for the duration of time that is specified by DELAY. A longlog condition exists when REORG PLUS determines that the DB2 subsystem is generating log records for the objects that you are reorganizing faster than REORG PLUS is applying them. The following values are valid for LONGLOG:
|
MAXRO | When REORG PLUS estimates that it can apply the remaining log records within the number of seconds that are specified for MAXRO, it begins the LOGFINAL phase. This estimate does not include the time that was spent producing incremental image copies and running the UTILTERM phase. If you originally set MAXRO to DEFER, REORG PLUS applies the log records indefinitely unless you specify a value in the DEADLINE option that is reached or you change DEFER to a value. |
DISPLAY | This option displays information about the log apply task. You can set the value to TERSE to get a summary of information for the entire process, or you can set it to VERBOSE to get information for each task that is part of the multitasking job. For the syntax and an example of the output from the DISPLAY command, see Utility Monitor. |
Considerations for log apply control options
The following additional considerations apply when you use the log apply control options:
- If MAXRO is DEFER, the LOGAPPLY phase continues indefinitely, and REORG PLUS ignores all other options (except DEADLINE). You must change MAXRO to a value (and possibly set other options) to complete the reorganization.
- Because it uses a weighted average of samples, REORG PLUS does not detect a longlog condition during brief spurts of activity.
- If REORG PLUS detects a longlog condition but ends before reaching the DELAY time, REORG PLUS resets the DELAY time to its original value.
Criteria for entering the LOGFINAL phase
For REORG PLUS to stop the LOGAPPLY phase and enter the LOGFINAL phase, both of the following conditions must exist:
- REORG PLUS estimates that it can complete the LOGFINAL phase by the time that is specified in DEADLINE (if DEADLINE has a value other than NONE).
- MAXRO is set to a value other than DEFER.
In addition, at least one of the following conditions must exist:
- The time specified in the LOGFINAL option has been reached.
- LOGFINAL is NONE, a longlog condition does not exist, and either the MAXRO or the LOGTHRESHLD conditions exist.
- The longlog condition exists, the time that is specified in the DELAY option has been reached, and LONGLOG is set to DRAIN.
The reorganization cannot complete if the LOGFINAL phase does not start. Also, if too many changes are made to the data sets between the time that XBM is initialized and the time that REORG PLUS applies the incremental image copies, the new data sets might be relatively disorganized. However, the new data sets should be less disorganized than the originals.
Criteria for ending the reorganization
If necessary, you can also end the reorganization before it completes, based on how you set the log apply control options. The reorganization ends if either of the following conditions exists:
- REORG PLUS estimates that it cannot finish processing before the time that you specify in the DEADLINE option.
- A longlog condition exists, the time that you specify in the DELAY option is reached, and you set LONGLOG to TERM.
Related topic