DB2 - Problem description
| Problem IT07061 | Status: Closed |
DB2LOOK WITH -T OPTION DOES NOT GENERATE A DEFINITION FOR A STORED PROCEDURE. | |
| product: | |
DB2 FOR LUW / DB2FORLUW / A10 - 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 users under V10.1FP5 * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to V10.1FP5. * **************************************************************** | |
| Local Fix: | |
| Solution | |
Upgrade to V10.1FP5. | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 10.02.2015 14.06.2015 14.06.2015 |
| Problem solved at the following versions (IBM BugInfos) | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 10.1.0.5 |
|