IBM Support

LI75749: SQLCODE -901 WITH REASON "ERROR IN GETTING COLDIST_DATA FROM STATS PROFILE" OBSERVED WITH STATEMENT COMPILATION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The query compiler may return sqlcode -901 with reason "Error in
    getting coldist_data from stats profile" when processing
    distribution statistics for the tables involved in the query.
    
    Example db2diag.log message:
    
    2010-09-03-16.22.49.982651-240 I227585A815        LEVEL: Severe
    
    PID : 3101176 TID : 1 PROC : db2agent (sample) 0
    
    INSTANCE: db2inst1              NODE : 000         DB   : sample
    
    APPHDL  : 0-1789               APPID: *N0.db2inst1.100903201620
    
    AUTHID  : db2inst1
    
    FUNCTION: DB2 UDB, trace services, sqlt_logerr_data, probe:0
    
    DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
    
     sqlcaid : SQLCA     sqlcabc: 136   sqlcode: -901   sqlerrml: 48
    
     sqlerrmc: Error in getting coldist_data from stats profile
    
     sqlerrp : SQLNQ741
    
     sqlerrd : (1) 0x00000000      (2) 0x00000000      (3)
    0x00000000
               (4) 0x00000000      (5) 0xFFFFFF9C      (6)
    0x00000000
     sqlwarn : (1)      (2)      (3)      (4)        (5)       (6)
    
               (7)      (8)      (9)      (10)        (11)
    
     sqlstate:
    

Local fix

  • It is likely that the error will stop after collecting
    statistics for affected tables. It is important to consider that
    the affected tables may include tables that are not directly
    referenced in the user-specified SQL, for example, replicated
    tables and MQTs.  The statistics collection should have the same
    num_freqvalues and num_quantiles specification for all the
    columns of the table.  For example, the following runstats
    commands collect distribution statistics for all columns using
    the database default num_freqvalues and num_quantiles settings.
        RUNSTATS ON TABLE S.T WITH DISTRIBUTION AND SAMPLED DETAILED
    INDEXES ALL
        RUNSTATS ON TABLE S.T_REPLICATED WITH DISTRIBUTION AND
    SAMPLED DETAILED INDEXES ALL
        RUNSTATS ON TABLE S.T_SUMMARY1 WITH DISTRIBUTION AND SAMPLED
    DETAILED INDEXES ALL
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Any using summary tables and runstats                        *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * A query can fail with a -901 error on coldist_data during    *
    * statement compilation                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to V9.1 fixpack 10 or later                          *
    ****************************************************************
    

Problem conclusion

  • This problem was first fixed in V9.1 Fixpack 10
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI75749

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-10-07

  • Closed date

    2011-06-17

  • Last modified date

    2011-06-17

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

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

    IC71872 IC71908 IC71909

Fix information

  • Fixed component name

    DB2 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R910 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 October 2021