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 IC77423 Status: Geschlossen

UNEXPECTED SQLCODE MIGHT BE REPORTED AFTER REPLACING A DATA TYPE

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
An unexpected sqlcode might be reported after replacing a user 
defined data type.  When the data type is replaced, 
authorization 
records are not recreated for the internal data type cast 
functions.  As a result, only users with DBADM authority will 
have execute privilege on the cast functions.  For users without 
DBADM authority, subsequent explicit or implicit references to 
the user defined type cast functions can result in an unexpected 
error. 
 
This is known to cause the following sqlcodes: 
- SQL0901N with the reason message "no cast function" 
- SQL0551N with the name of the cast function as the third token 
in the message 
 
Here is an example of both sqlcodes being reported. 
 
create type arr1 as int array[10] 
DB20000I  The SQL command completed successfully. 
 
create or replace type arr1 as int array[10] 
DB20000I  The SQL command completed successfully. 
 
begin 
 declare v1 arr1; 
 set v1 = null; 
end 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0901N  The SQL statement failed because of a non-severe 
system error. 
Subsequent SQL statements can be processed.  (Reason "no cast 
function".) 
LINE NUMBER=3.  SQLSTATE=58004 
 
begin 
 declare v1 arr1; 
 set v1 = arr1(array[1,2,3]); 
end 
DB21034E  The command was processed as an SQL statement because 
it was not a 
valid Command Line Processor command.  During SQL processing it 
returned: 
SQL0551N  "NEWTON" does not have the required authorization or 
privilege to 
perform operation "EXECUTE" on object "NEWTON.ARR1".  LINE 
NUMBER=3. 
SQLSTATE=42501
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All users of DB2 LUW version 9.7, starting in fix pack 1     * 
* when the ability to replace a data type first appeared.      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* An unexpected sqlcode might be reported after replacing a    * 
* user                                                         * 
* defined data type.  When the data type is replaced,          * 
* authorization                                                * 
* records are not recreated for the internal data type cast    * 
*                                                              * 
* functions.  As a result, only users with DBADM authority     * 
* will                                                         * 
* have execute privilege on the cast functions.  For users     * 
* without                                                      * 
* DBADM authority, subsequent explicit or implicit references  * 
* to                                                           * 
* the user defined type cast functions can result in an        * 
* unexpected                                                   * 
* error.                                                       * 
*                                                              * 
*                                                              * 
*                                                              * 
* This is known to cause the following sqlcodes:               * 
*                                                              * 
* - SQL0901N with the reason message "no cast function"        * 
*                                                              * 
* - SQL0551N with the name of the cast function as the third   * 
* token in the message                                         * 
*                                                              * 
*                                                              * 
*                                                              * 
* Here is an example of both sqlcodes being reported.          * 
*                                                              * 
*                                                              * 
*                                                              * 
* create type arr1 as int array[10]                            * 
* DB20000I  The SQL command completed successfully.            * 
*                                                              * 
* create or replace type arr1 as int array[10]                 * 
* DB20000I  The SQL command completed successfully.            * 
*                                                              * 
* begin                                                        * 
*  declare v1 arr1;                                            * 
*  set v1 = null;                                              * 
* end                                                          * 
* DB21034E  The command was processed as an SQL statement      * 
* because it was not a                                         * 
* valid Command Line Processor command.  During SQL processing * 
* it returned:                                                 * 
* SQL0901N  The SQL statement failed because of a non-severe   * 
* system error.                                                * 
* Subsequent SQL statements can be processed.  (Reason "no     * 
* cast function".)                                             * 
* LINE NUMBER=3.  SQLSTATE=58004                               * 
*                                                              * 
* begin                                                        * 
*  declare v1 arr1;                                            * 
*  set v1 = arr1(array[1,2,3]);                                * 
* end                                                          * 
* DB21034E  The command was processed as an SQL statement      * 
* because it was not a                                         * 
* valid Command Line Processor command.  During SQL processing * 
* it returned:                                                 * 
* SQL0551N  "NEWTON" does not have the required authorization  * 
* or privilege to                                              * 
* perform operation "EXECUTE" on object "NEWTON.ARR1".  LINE   * 
* NUMBER=3.                                                    * 
* SQLSTATE=42501                                               * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 LUW version 9.7 fix pack 5.                   * 
****************************************************************
Local-Fix:
Manually drop the data type and reissue the CREATE TYPE 
statement.
verfügbare FixPacks:
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
Workaround
See LOCAL FIX
Kommentar
Fix release: DB2 LUW version 9.7 fix pack 5 
Fix commitment level: 999
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
08.07.2011
08.12.2011
08.12.2011
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.FP5
Problem behoben lt. FixList in der Version
9.7.0.5 FixList