IBM Support

IC72906: QUERY COMPILER INCORRECTLY RETURNS SQLCODE -101 WHEN IT SHOULD NOT.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • Under rare conditions, the query compiler might return sqlcode
    -101 when it should not.
    
    A db2trc flw output shows one of the following functions
    sqlno_find_jp_hash_table or sqlno_do_insert_qpt in the call
    stack when function sqlno_alloc_aub receives return code
    SQLO_NOMEM_STMTH from the functions it calls.
    
    Starting with DB2 Version 9.5 Fix Pack 6 and DB2 Version 9.7 Fix
    Pack 3, confirmation of the problem can be made from db2 diaglog
    entries.   At DIAGLEVEL 3 or higher, the db2 diaglog file shows
    a compiler error stack for rc -2144272209 logged by sqlnn_cmpl.
    The error stack will contain one of the problematic functions
    sqlno_find_jp_hash_table or sqlno_do_insert_qpt.  The following
    is an example with sqlno_find_jp_hash_table in
    the error stack.
    
    2010-11-02-08.39.56.394386-300 E527827E1139   LEVEL: Info
    PID : 18633  TID : 47702863767872   PROC : db2sysc 0
    INSTANCE: myinst    NODE : 000      DB   : MYDB
    APPHDL  : 0-12838   APPID: 10.42.0.102.49829.101102125142
    AUTHID  : MYAUTHID
    EDUID   : 254                  EDUNAME: db2agent (MYDB) 0
    FUNCTION: DB2 UDB, SW- common services, sqlnn_cmpl, probe:650
    MESSAGE : ZRC=0x803100AF=-2144272209=SQLNN_E_BADNEWS "unexpected
    error but state is OK"
    DATA #1 : String, 599 bytes
    Compiler error stack for rc = -2144272209:
    sqlnn_cmpl[390]
    sqlno_exe[900]
    sqlno_planning_phase[200]
    sqlno_planning_scan[400]
    sqlno_scan_utils_qgm[200]
    sqlno_each_qur[400]
    sqlno_top_qtb[100]
    sqlno_each_opr[200]
    sqlno_walk_qun[100]
    sqlno_each_opr[900]
    sqlno_plan_end_opr[100]
    sqlno_gen_partitions_for_Q[400]
    sqlno_crule_join[100]
    sqlno_get_best_plan[100]
    sqlno_get_best_plan[200]
    sqlno_find_plan_chain[200]
    sqlno_find_plan_entry[120]
    sqlno_hash_PRDs[120]
    sqlno_jp_hash_N_word_key[100]
    sqlno_find_jp_hash_table[160]
    sqlno_insert_prd_set[100]
    sqlno_copy_setN[100]
    sqlno_grow_pool[200]
    sqlno_alc_aub[10]
    
    Starting with DB2 Version 9.5, STMTHEAP permitted an AUTOMATIC
    attribute.  This problem is independent of the AUTOMATIC
    attribute.
    

Local fix

  • It is possible that a small increase in the STMTHEAP
    setting will allow the statement to compile without experiencing
    the -101 error.
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All users                                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Under rare conditions, the query compiler might return       *
    * sqlcode  -101 when it should not.                            *
    *                                                              *
    *                                                              *
    *                                                              *
    * A db2trc flw output shows one of the following functions     *
    * sqlno_find_jp_hash_table or sqlno_do_insert_qpt in the call  *
    * stack when function sqlno_alloc_aub receives return code     *
    * SQLO_NOMEM_STMTH from the functions it calls.                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Users can upgrade to DB2 V9.7 fix pak 4 to avoid this        *
    * defect.                                                      *
    ****************************************************************
    

Problem conclusion

  • First Fixed in DB2 Version V9.7 fix pak 4
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC72906

  • 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

    2010-11-30

  • Closed date

    2011-05-12

  • Last modified date

    2011-05-12

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

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

    IC72979 IC72982

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC72906

Modified date: 12 May 2011