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

DBMS_UTILITY.GET_DEPENDENCY RETURNS WRONG RESULTS IF A FUNCTION WAS CREATED
WITHOUT SPECIFIC NAME SET TO THE FUNCTION NAME

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Example with SPECIFIC NAME NOT specified: 
 
CREATE OR REPLACE FUNCTION SCHEMA1.FUNC1( data int) 
-- SPECIFIC FUNC1 <-- commented out 
RETURNS INTEGER 
BEGIN 
  DECLARE x INTEGER; 
  RETURN x; 
END 
 
CREATE OR REPLACE FUNCTION SCHEMA1.FUNC2() 
--SPECIFIC FUNC2 <- commented out 
RETURNS INTEGER 
BEGIN 
  DECLARE retVal INTEGER; 
  SELECT SCHEMA1.FUNC1(1) INTO retVal FROM SYSIBM.SYSDUMMY1; 
END 
 
 
CALL DBMS_UTILITY.GET_DEPENDENCY('FUNCTION', 'SCHEMA1', 'FUNC1') 
 
  Return Status = 0 
 
 
DEPENDENCIES ON SCHEMA1.FUNC1 
---------------------------------------------------------------- 
-- 
*FUNCTION SCHEMA1.FUNC1() 
 
Above is wrong. 
Correct result: 
 
 
CALL DBMS_UTILITY.GET_DEPENDENCY('FUNCTION', 'SCHEMA1', 'FUNC1') 
 
  Return Status = 0 
 
DEPENDENCIES ON SCHEMA1.FUNC1 
---------------------------------------------------------------- 
-- 
*FUNCTION SCHEMA1.FUNC1() 
*   FUNCTION SCHEMA1 .FUNC2() 
 
Note if it was a PL/SQL routine, the specific name is generated 
to be the same as the routine name. Hence, this problem doesn't 
show up in PL/SQL context.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* users of DBMS_UTILITY.GET_DEPENDENCY                         * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* DBMS_UTILITY.GET_DEPENDENCY RETURNS WRONG RESULTS IF         * 
* AFUNCTIONWAS CREATED WITHOUT SPECIFIC NAME SET TO THE        * 
* FUNCTION NAME                                                * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* install this fix                                             * 
****************************************************************
Local Fix:
recreate all routines and specify specific name to be the same 
as routine name
available fix packs:
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
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 9a 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 10 for Linux, UNIX, and Windows

Solution
DBMS_UTILITY.GET_DEPENDENCY RETURNS WRONG RESULTS IF A FUNCTION 
WAS CREATED WITHOUT SPECIFIC NAME SET TO THE FUNCTION NAME
Workaround
not known / see Local fix
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC66682 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
17.02.2010
10.06.2010
10.06.2010
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.2 FixList