DB2 - Problem description
Problem IC80979 | Status: Closed |
WHEN CREATE PACKAGE BODY GETS ERROR SQL20481N, THE ERROR MESSAGE DOES NOT IDENTIFY THE PROCEDURE THAT REFERENCES ITSELF. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When you run the CREATE PACKAGE BODY command for a package body that contains a procedure that references itself (whether directly or indirectly), it gets an error of the following form. SQL20481N The creation or revalidation of object "<object-name>" would result in an invalid direct or indirect self-reference. The "<object-name>" in the error message is the specific name and not the real name of the procedure. Because the package creation has failed due to the SQL20481N error, the specific name does not persist in the DB2 system catalog, so it is not possible find the real name of the procedure. With this APAR fix the "<object-name>" in the error message is the real name of the procedure. The following script demonstrates the problem. <code> create or replace package test_self_reference as procedure proc1; end@ create or replace procedure proc2 is begin test_self_reference.proc1(); end@ create or replace package body test_self_reference is procedure proc1 is begin proc2(); end proc1; end@ </code> Because of this defect the CREATE OR REPLACE PACKAGE BODY statement gets an error like this. SQL20481N The creation or revalidation of object "<schema-name>.TEST_SELF_REFERENCE.SQL120119100237800" would result in an invalid direct or indirect self-reference. With this APAR fix the CREATE OR REPLACE PACKAGE BODY gets an error like this instead. SQL20481N The creation or revalidation of object "<schema-name>.TEST_SELF_REFERENCE.PROC1" would result in an invalid direct or indirect self-reference. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users of DB2 for Linux, UNIX and Windows * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * . * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in Version 9.7 Fix Pack 6. At a minimum, this fix should be applied on the database server. | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC84312 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.01.2012 12.06.2012 12.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |