home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC67263 Status: Closed

CREATION OF SUBVIEW SUCCEEDS BUT SHOULD FAIL WITH SQLCODE SQL20053
REASON CODE 2, SQLSTATE 428EA

product:
DB2 FOR LUW / DB2FORLUW / 980 - DB2
Problem description:
For a hierarchy of views and subviews: Let BR1 and BR2 be any 
branches that appear in the definitions of views in the 
hierarchy. Let T1 be the underlying table or view of BR1, and 
let T2 be the underlying table or view of BR2. Then: 
 
    * If T1 and T2 are not in the same hierarchy, then the root 
view in the view hierarchy must specify the UNCHECKED option for 
its OID column. 
    * If T1 and T2 are in the same hierarchy, then BR1 and BR2 
must contain predicates or ONLY-clauses that are sufficient to 
guarantee that their row-sets are disjoint. 
 
The second requirement is not always correctly enforced, this 
can happen if there is a predicate that compares two different 
columns.  For example: 
 
  CREATE VIEW v1 OF vt1 MODE DB2SQL (REF IS oid USER GENERATED) 
   AS SELECT vt1(VARCHAR(oid)), 1 FROM legacy 
       WHERE c1 = 40; 
 
  CREATE VIEW v2 OF vt2 MODE DB2SQL UNDER v1 INHERIT SELECT 
PRIVILEGES 
   EXTEND AS SELECT 2 FROM legacy 
              WHERE c1 = 30 or c1 = c2; 
 
The creation of v2 should be blocked with SQLSTATE 428EA but it 
is not.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* For a hierarchy of views and subviews: Let BR1 and BR2 be    * 
* any                                                          * 
* branches that appear in the definitions of views in the      * 
*                                                              * 
* hierarchy. Let T1 be the underlying table or view of BR1,    * 
* and                                                          * 
* let T2 be the underlying table or view of BR2. Then:         * 
*                                                              * 
*                                                              * 
*                                                              * 
* * If T1 and T2 are not in the same hierarchy, then the       * 
* root                                                         * 
* view in the view hierarchy must specify the UNCHECKED option * 
* for                                                          * 
* its OID column.                                              * 
*                                                              * 
* * If T1 and T2 are in the same hierarchy, then BR1 and       * 
* BR2                                                          * 
* must contain predicates or ONLY-clauses that are sufficient  * 
* to                                                           * 
* guarantee that their row-sets are disjoint.                  * 
*                                                              * 
*                                                              * 
*                                                              * 
* The second requirement is not always correctly enforced,     * 
* this                                                         * 
* can happen if there is a predicate that compares two         * 
* different                                                    * 
* columns.  For example:                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* CREATE VIEW v1 OF vt1 MODE DB2SQL (REF IS oid USER           * 
* GENERATED)                                                   * 
* AS SELECT vt1(VARCHAR(oid)), 1 FROM legacy                   * 
*                                                              * 
* WHERE c1 = 40;                                               * 
*                                                              * 
*                                                              * 
*                                                              * 
* CREATE VIEW v2 OF vt2 MODE DB2SQL UNDER v1 INHERIT SELECT    * 
*                                                              * 
* PRIVILEGES                                                   * 
*                                                              * 
* EXTEND AS SELECT 2 FROM legacy                               * 
*                                                              * 
* WHERE c1 = 30 or c1 = c2;                                    * 
*                                                              * 
*                                                              * 
*                                                              * 
* The creation of v2 should be blocked with SQLSTATE 428EA but * 
* it                                                           * 
* is not.                                                      * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 version 9.8 fix pack 3                        * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.8 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.8 Fix Pack 4 for AIX and Linux
DB2 Version 9.8 Fix Pack 5 for AIX and Linux

Solution
First fixed in DB2 version 9.8 fix pack 3
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
16.03.2010
20.12.2010
20.12.2010
Problem solved at the following versions (IBM BugInfos)
9.8.FP3
Problem solved according to the fixlist(s) of the following version(s)
9.8.0.3 FixList