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

DB2LOOK WITH -T OPTION DOES NOT GENERATE A DEFINITION FOR A STORED
PROCEDURE.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
db2look with -t option generates all the dependent objects on 
the table specified, except for stored procedures. 
 
Take SAMPLE database for example, there are 1 
UDF,RESIGN_EMPLOYEE,  and 1 stored procedure,BONUS_INCREASE, 
created on EMPLOYEE table. 
 
When the following command is run, 
 
$ db2look -d SAMPLE -e -t EMPLOYEE 
 
it will only generate DDL for RESIGN_EMPLOYEE, not 
BONUS_INCREASE. 
 
CREATE FUNCTION resign_employee (number CHAR(6)) 
  RETURNS TABLE (empno  CHAR(6), 
                 salary DOUBLE, 
                 dept   CHAR(3)) 
  SPECIFIC resign_employee 
  MODIFIES SQL DATA 
  LANGUAGE SQL 
  BEGIN ATOMIC 
-- 
---------------------------------------------------------------- 
--------------------- 
-- Routine type:  SQL table function 
-- Routine name:  resign_employee 
-- 
-- Purpose:  This procedure takes in an employee number, then 
removes that 
--           employee from the EMPLOYEE table. 
--           A useful extension to this function would be to 
archive the 
--           original record into an archive table. 
-- 
-- 
---------------------------------------------------------------- 
---------------------- 
    DECLARE l_salary DOUBLE;-- 
    DECLARE l_job CHAR(3);-- 
 
    SET (l_salary, l_job) = (SELECT salary, job 
                               FROM OLD TABLE (DELETE FROM 
employee 
                                                WHERE 
employee.empno = number));-- 
 
    RETURN VALUES (number,l_salary, l_job);-- 
  END; 
 
SET CURRENT SCHEMA = "DB2INST1"; 
SET CURRENT PATH = 
"SYSIBM","SYSFUN","SYSPROC","SYSIBMADM","DB2INST1";
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All DB2 V9.7 Users                                           * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 V9.7 Fix Pack 10 or higher.                   * 
****************************************************************
Local Fix:
Solution
Fixed in DB2 V9.7 Fix Pack 10.
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
24.03.2014
17.02.2015
17.02.2015
Problem solved at the following versions (IBM BugInfos)
9.7.FP10
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.10 FixList