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 IC69455 Status: Closed

SQL0950N WHEN THE SQL QUERY BEING ISSUED CONTAINS REFERENCE TO A SQL BODIED
PROCEDURE, FUNCTION OR METHOD.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
You may experience a 
 
SQL0950N A DROP TABLE or DROP INDEX statement cannot be issued 
when an open cursor is currently using the table or index 
 
when the SQL query being issued contains reference to a SQL 
bodied procedure, function or method using input parameters that 
are columns from tables referenced in the main query. The SQL 
bodied procedure, function or method must contain a complex 
common table expression or WITH clause that is referenced in 
multiple portions of the function body and includes a reference 
to the input parameter. For example 
 
CREATE FUNCTION FUNC1(IN_KEY INTEGER) 
RETURNS TABLE(OUT_KEY INTEGER, OUT_NAME VARCHAR(100)) 
LANGUAGE SQL 
READS SQL DATA 
RETURN 
WITH A(KEY, NAME) AS (SELECT COL1, MAX(NAME) FROM T WHERE T.COL2 
= IN_KEY GROUP BY COL1), 
     B(MNAME) AS (SELECT MAX(NAME) FROM A) 
SELECT KEY, NAME FROM A, B WHERE NAME=MNAME; 
 
 
The common table expression 'A' is referenced in multiple places 
with the function body and it also contains a reference to the 
input parameter. 
 
If the execution plan for this query contains two or more MSJOIN 
operations each reference the common table expression 'A' as the 
left side input to the MSJOIN, then the query execution has the 
potential to experience the error.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Prior to DB2 V97 FP3.                                        * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* SQL0950N WHEN THE SQL QUERY BEING ISSUED CONTAINS REFERENCE  * 
* TO A SQL BODIED PROCEDURE, FUNCTION OR METHOD.               * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade DB2 to V97 FP3.                                      * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
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 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Problem is first fixed in DB2 V97 FP3.
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC69743 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
24.06.2010
24.09.2010
24.09.2010
Problem solved at the following versions (IBM BugInfos)
9.7.FP3
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.3 FixList
9.7.0.3 FixList