IBM Support

JR27778: EXPLAIN WITH/FOR SNAPSHOT WHEN MQT MATCHING IS ENABLED , FAILES WITH ERROR SQL0104N.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The fix is incomplete and JR29140 is needed to complete the fix.
    
    Scenario:
    
    create table t1 (i1 int not null primary key, i2 int);
    create table t2 (i1 int not null primary key, i2 int);
    create table mqt1 as (select t1.i1 as c1, t2.i1 as c2, count(*)
    as c3 from t1, t2 where t1.i1 = t2.i1 group by t1.i1, t2.i1)
    data initially deferred refresh immediate;
    refresh table mqt1;
    
    -- This statement returns SQL104N incorrectly
    EXPLAIN PLAN SELECTION WITH SNAPSHOT
    FOR select t1.i1 as c1, t2.i1 as c2 from t1, t2 where t1.i1 =
    t2.i1 group by t1.i1, t2.i1;
    
    Criteria for hitting the bug:
    - DB2 v9
    - EXPLAIN ... WITH/FOR SNAPSHOT <query>
    - There exists REFRESH IMMEDIATE MQTs, or REFRESH DEFERRED MQTs
    (where MQT routing is enabled, i.e. set current refresh age =
    any)
    - the <query> is routable to such MQTs
    
    Workaround:
    - If possible, remove the WITH/FOR SNAPSHOT clause.
    

Local fix

  • Workaround:
    - If possible, remove the WITH/FOR SNAPSHOT clause.
    

Problem summary

  • see problem description
    

Problem conclusion

  • First fixed in DB2 UDB Version 9.5, FixPak 1
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR27778

  • Reported component name

    DB2 UDB ESE WIN

  • Reported component ID

    5765F4101

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-11-05

  • Closed date

    2008-05-16

  • Last modified date

    2008-05-16

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

    JR26599

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

Fix information

  • Fixed component name

    DB2 UDB ESE WIN

  • Fixed component ID

    5765F4101

Applicable component levels

  • R910 PSY

       UP

  • R950 PSY

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

Document Information

Modified date:
16 May 2008