home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC74797 Status: Geschlossen

CREATION OF MQT WITH DISTINCT TYPE MAY SUCCEED UNEXPECTEDLY IN NUMBER OR
ORA COMPATIBILITY MODE

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
With the number_compat database configuration parameter set to 
ON, creation of a refresh immediate MQT that 
references a distinct type as a group by column may succeed 
unexpectedly, while subsequent updates on the base table of the 
MQT may result in SQL0901N. SQL20058N rc 6 should have been 
returned during table creation. 
 
  CREATE DISTINCT TYPE MONEY AS DECIMAL(8,2) WITH COMPARISONS; 
  CREATE FUNCTION COUNT(MONEY) RETURNS INTEGER SOURCE 
COUNT(DECIMAL()); 
  CREATE FUNCTION SUM(MONEY) RETURNS MONEY SOURCE 
SUM(DECIMAL()); 
 
  create table t1(m1 money, m2 money); 
 
  create table t2(m1, sum_m2, count_m2, count_all) as 
   (select m1, sum(m2), count(m2), count(*) from t1 where m2 >= 
money(100.00) 
    group by m1) 
   data initially deferred refresh immediate disable query 
optimization;
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* User using NUMBER/ORA compatibility feature                  * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* With the number_compat database configuration parameter set  * 
* to ON, creation of a refresh immediate MQT that references a * 
* distinct type as a group by column may succeed unexpectedly, * 
* while subsequent updates on the base table of the MQT may    * 
* result in SQL0901N. SQL20058N rc 6 should have been returned * 
* during table creation.                                       * 
*                                                              * 
* CREATE DISTINCT TYPE MONEY AS DECIMAL(8,2) WITH COMPARISONS; * 
* CREATE FUNCTION COUNT(MONEY) RETURNS INTEGER SOURCE          * 
* COUNT(DECIMAL());                                            * 
* CREATE FUNCTION SUM(MONEY) RETURNS MONEY SOURCE              * 
* SUM(DECIMAL());                                              * 
*                                                              * 
* create table t1(m1 money, m2 money);                         * 
*                                                              * 
* create table t2(m1, sum_m2, count_m2, count_all) as          * 
*  (select m1, sum(m2), count(m2), count(*) from t1 where m2   * 
* >= money(100.00)                                             * 
*   group by m1)                                               * 
*  data initially deferred refresh immediate disable query     * 
* optimization;                                                * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 9.7 Fix Pack 4 or above.                      * 
****************************************************************
Local-Fix:
Drop the MQT
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
The fix to properly return SQL20058N first appeared in DB2 9.7 
Fix Pack 4.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
02.03.2011
28.04.2011
28.04.2011
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.,
9.7.FP4
Problem behoben lt. FixList in der Version
9.7.0.4 FixList