A fix is available
APAR status
Closed as new function.
Error description
When ALTER PARTITION is executed on the last logical partition where existing limit key value is all MAXVALUE, object will be placed in hard reorg pending as it was in V10. All other alterations of limit key values will remain V11 pending behavior.
Local fix
n/a
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 11 for z/OS users of ALTER TABLE * * ALTER PARTITION to change the limit key * * value of a partition. * **************************************************************** * PROBLEM DESCRIPTION: ALTER TABLE ALTER PARTITION to change * * the limit key value of the last logical * * partition from a current value of * * MAXVALUE or MINVALUE is a pending * * operation that leaves the last * * partition in non-restrictive advisory * * REORG pending (AREOR) status. * * A subsequent attempt to issue ALTER * * TABLE ADD PARTITION fails with * * SQLCODE -20385, since immediate options * * are not allowed if there are any * * unmaterialized pending changes for the * * table space. * * * **************************************************************** * RECOMMENDATION: * **************************************************************** ALTER TABLE ALTER PARTITION to change the limit key value of the last logical partition from a current value of MAXVALUE or MINVALUE is a pending operation that leaves the last partition in non-restrictive advisory REORG pending (AREOR) status. This pending alter complicates the handling for a subsequent ALTER TABLE ADD PARTITION operation as shown in the following scenario: 1. User has a populated table where the limit key for the last logical partition is all MAXVALUE. 2. User wants to add a partition, but cannot since the last partition's limit key value is already at MAXVALUE. 3. User proceeds as follows: + User issues ALTER TABLE ALTER PARTITION to decrease the limit key value of the last logical partition => this is a pending change, that leaves the last logical partition in AREOR state and available. + User issues ALTER TABLE ADD PARTITION => this fails with SQLCODE -20385 since immediate options are not allowed if there are any unmaterialized pending changes for the table space + User issues REORG TABLESPACE of parts in pending state => REORG of the last logical partition may result in discarded rows which need to be saved + User issues ALTER TABLE ADD PARTITION => this is an immediate change, as the new part is added with no pending state, and is available. + User issues LOAD into table, which is needed to load all the discarded rows back into the table. Note that a similar sequence of steps is required for the case where the last logical partition has a limit key of all MINVALUE (for descending). It is desirable to simplify the processing for this scenario, which can be accomplished by making the ALTER TABLE ALTER PARTITION an immediate change when altering the last logical partition limit key value from MAXVALUE or MINVALUE.
Problem conclusion
Temporary fix
Comments
DB2 has been changed to execute ALTER TABLE ALTER PARTITION limit key as immediate rather than pending if altering the last logical partition (smaller) from MAXVALUE or if altering the last logical partition (larger) from MINVALUE. The last logical partition (if non-empty) is left in REORP state and is not available. This allows a subsequent ALTER TABLE ADD PARTITION to be executed as an immediate change, and a REORG TABLESPACE of partitions in pending state to move the data to the appropriate part and make it available. ALTER TABLE ALTER PARTITION will only be immediate if there are no unmaterialized partition-level pending alters for the last logical partition and the previous logical partition. ADDITIONAL KEYWORDS: SQLALTER SQLCODE20385
APAR Information
APAR number
PI42999
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
B10
Status
CLOSED UR1
PE
NoPE
HIPER
NoHIPER
Special Attention
YesSpecatt / New Function
Submitted date
2015-06-15
Closed date
2015-10-27
Last modified date
2015-12-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI32413
Modules/Macros
DSNXIATB
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RB10 PSY UI32413
UP15/11/12 P F511
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
02 December 2015