IBM Support

IT01565: REORG ON A TABLE WITH FOREIGN KEY CONSTRAINT CAN RESULT IN SQL ON PARENT TABLE GETTING LOCK TIMEOUT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • DB2 will require a lock on a seemingly unrelated table when
    performing a select. This can cause unexpected lock timeouts
    when a reorg is active.
    
    The following scenario demonstrates the problem.
    
    Consider 3 tables, A, B and C
    Table A has a foreign key on table B.
    
    A reorg of table A is started.
    A select similar to the following is executed :
    
    select
    ...
    from B left outer join
            C on
    ...
    
    In order to compile this query, DB2 will also evaluate
    constraints that may exist on the tables.
    As there is a foreign key constraint from A to B, table A will
    be locked but the lock mode is incompatible with the current
    lock due to the reorg.
    
    The fix for this APAR will relax the locking required so that
    table A will no longer need to be locked during query
    compilation
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All Platforms                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 LUW v9.7 Fixpack 10 or Later.                 *
    ****************************************************************
    

Problem conclusion

  • First Fixed in DB2 LUW v9.7 Fixpack 10.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT01565

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-05-06

  • Closed date

    2014-12-29

  • Last modified date

    2014-12-29

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

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

    IT01786

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
29 December 2014