DB2 - Problem description
Problem IT24545 | Status: Closed |
DB2LOOK HAS DUPLICATE/INCORRECT COLUMN IN REFERENCES CLAUSE OF FOREIGN KEY DDL. | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
Starting in Db2 v10.5 fp9 and v11.1 fp3, db2look might have extra/incorrect columns in references clause of foreign key ddl. This can happen when a different schema exists with same name and constraint name. When recreating an environment with db2look, it will fail. This issue is to be fixed in the next released fixpack ----------------- db2look ---------------------------------------------- ALTER TABLE "PROD "."RE_RESS_COMP" ADD CONSTRAINT "R3R02R01" FOREIGN KEY ("MATRIC_RETR", "LF_RETRAITE") REFERENCES "PROD "."RE_SUIVI_AS" ("MATRIC_RETR", "MATRIC_RETR", "LF_RETRAITE", "LF_RETRAITE") --> Duplicate column. ON DELETE CASCADE ON UPDATE RESTRICT ENFORCED ENABLE QUERY OPTIMIZATION; Another symptom is SYSPROC.ADMIN_COPY_SCHEMA creating duplicate columns because it relies on db2look under the covers. Before calling SYSPROC.ADMIN_COPY_SCHEMA the constraint is defined as ALTER TABLE "DB2INST1 "."TAB1" ADD CONSTRAINT "F1" FOREIGN KEY ("TAB2_ID") REFERENCES "DB2INST1 "."TAB2" ("TAB2_ID") ON DELETE CASCADE ON UPDATE NO ACTION; After calling SYSPROC.ADMIN_COPY_SCHEMA constraint is defined as ALTER TABLE "DB2INST1 "."TAB1" ADD CONSTRAINT "F1" FOREIGN KEY ("TAB2_ID") REFERENCES "DB2INST1 "."TAB2" ("TAB2_ID", "TAB2_ID") | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Run db2look in v10.5fp9 and v11.1fp2. * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to the latest fix pack. * **************************************************************** | |
Local Fix: | |
Manually Correct it. | |
Solution | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : follow-up : IT26008 | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 27.03.2018 18.07.2018 22.05.2019 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) |