IBM Support

IC66252: DB2 INSTANCE ENDS ABNORMALLY COMPILING QUERY WITH A LARGE NUMBER OF UNIONS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Compiling a query with a large number of UNIONs may result in a
    stack overflow and termination of the DB2 instance.  The call
    stack looks similar to this example from Linux:
    
      0000002A97833854 _Z24sqlnq_process_connect_byP9sqlnq_qtbP3loc
    + 0x001c
    
    (/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.glibc.2.
    3/lib64/libdb2e.so.1)
      0000002A97835D77 _Z24sqlnq_process_connect_byP9sqlnq_qtbP3loc
    + 0x253f
    
    (/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.glibc.2.
    3/lib64/libdb2e.so.1)
       0000002A97835D77 _Z24sqlnq_process_connect_byP9sqlnq_qtbP3loc
    + 0x253f
    
    (/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.glibc.2.
    3/lib64/libdb2e.so.1)
      0000002A97835D77 _Z24sqlnq_process_connect_byP9sqlnq_qtbP3loc
    + 0x253f
    
    (/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.glibc.2.
    3/lib64/libdb2e.so.1)
      ...
    
    For this problem to occur, the DB2_COMPATIBILITY_VECTOR registry
    variable must have the hierarchical query bit set (bit 4), e.g.:
    
      DB2_COMPATIBILITY_VECTOR=08
    
    or
    
      DB2_COMPATIBILITY_VECTOR=ORA
    
    But the query does not necessarily have to use hierarchical
    queries (i.e. a CONNECT BY clause).
    

Local fix

  • Disable hierarchical queries if not needed by unsetting bit 4 in
    DB2_COMPATIBILITY_VECTOR.  Alternatively, rewrite the query to
    reduce the number of UNIONs.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * ALL                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Compiling a query with a large number of UNIONs may resultin *
    * astack overflow and termination of the DB2 instance.         *
    * Thecallstack looks similar to this example from              *
    * Linux:0000002A97833854_Z24sqlnq_process_connect_byP9sqlnq_qtbP
    * 0x001c(/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.
    * 0x253f(/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.
    * 0x253f(/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.
    * 0x253f(/ms/dist/ibmdb2/PROJ/ds/9.5.4.4/.exec/x86_64.linux.2.6.
    * this problem to occur, the                                   *
    * DB2_COMPATIBILITY_VECTORregistryvariable must have the       *
    * hierarchical query bit set (bit                              *
    * 4),e.g.:DB2_COMPATIBILITY_VECTOR=08orDB2_COMPATIBILITY_VECTOR=
    * the query does not necessarily have to use                   *
    * hierarchicalqueries (i.e. a CONNECT BY clause).              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to DB2 v9.5 Fix Pack 6Otherwise, disable             *
    * hierarchical queries if not needed byunsetting bit 4         *
    * inDB2_COMPATIBILITY_VECTOR.  Alternatively, rewrite the      *
    * querytoreduce the number of UNIONs.                          *
    ****************************************************************
    

Problem conclusion

  • First fixed in DB2 v9.5 Fix Pack 6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC66252

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-02-11

  • Closed date

    2010-05-25

  • Last modified date

    2010-05-25

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

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

    IC66378 IC66653

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R950 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.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
25 May 2010