IBM Support

PH35158: CREATING NEW INDEX ON HISTORY TABLE ALSO ADDS EXTRA ALTER TABLE <OWNER>.<TBNAME> ADD PRIMARY KEY SQLCODE =

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When analyzing a change to CREATE a new INDEX on a
    HISTORY TABLE the following ALTER is also generated:
    
    ALTER TABLE <owner>.<tbname>
    ADD PRIMARY KEY
    ( <col1, col2> ) ;
    
    When the WSL is run, the following error occurs:
    
    DSNT408I SQLCODE = -624, ERROR: TABLE >schema.name< ALREADY HAS
    A PRIMARY KEY OR UNIQUE CONSTRAINT WITH SPECIFIED COLUMNS
    AND PERIODS
    
    Keyword:  SQLCODE624N
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: Users of the Db2 Administration Tool for     *
    *                 z/OS and Db2 Object Comparison Tool for z/OS *
    ****************************************************************
    * PROBLEM DESCRIPTION: Importing and analyzing a change to add *
    *                      a new index to a history table          *
    *                      results in an extra alter to the table. *
    *                      The resulting work statement list (WSL) *
    *                      should only create the new index.       *
    *                                                              *
    ****************************************************************
    Analyzing an imported change to add a new index to a history
    table results in a WSL that creates the index and
    alters the table to add a primary key. Because the primary key
    already exists on the table, running the WSL results in the
    following error:
    
    DSNT408I SQLCODE = -624, ERROR: TABLE >schema.name< ALREADY HAS
    A PRIMARY KEY OR UNIQUE CONSTRAINT WITH SPECIFIED COLUMNS
    AND PERIODS
    
    Keyword:  SQLCODE624N
    

Problem conclusion

  • The problem has been resolved.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH35158

  • Reported component name

    DB2 ADMIN TOOL

  • Reported component ID

    568851500

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-03-09

  • Closed date

    2021-06-28

  • Last modified date

    2021-07-02

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

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

    UI76114

Modules/Macros

  • ADB2CMT
    

Fix information

  • Fixed component name

    DB2 ADMIN TOOL

  • Fixed component ID

    568851500

Applicable component levels

  • RC10 PSY UI76114

       UP21/06/30 P F106

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.

[{"Type":"MASTER","Line of Business":{"code":"","label":""},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSZJXP","label":""},"Version":"All Versions"}]

Document Information

Modified date:
03 July 2021