DB2 - Problembeschreibung
Problem IC77374 | Status: Geschlossen |
DATA TYPE UNDER THE TABLE COLUMNS BECOMES NULL AFTER RENAMING THE COLUMN USING THE ALTER TABLE STATEMENT. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
Here is a simple example: --> CREATE TYPE "TAB_1_1"."T_UDST" AS ( "NAME" VARCHAR(20), "HEADCOUNT" INTEGER ) MODE DB2SQL REF USING INTEGER; --> CREATE TABLE "TAB_1_1"."TAB_REF_SCOPE" OF "TAB_1_1"."T_UDST"( REF IS "OID" USER GENERATED ); --> CREATE TABLE "TAB_1_1"."TAB_SCOPE_EQ" ("COL1" REF("TAB_1_1"."T_UDST")); --> ALTER TABLE "TAB_1_1"."TAB_SCOPE_EQ" ALTER COLUMN "COL1" ADD SCOPE "TAB_1_1"."TAB_REF_SCOPE"; db2 "select tabschema, tabname, colname, typename, target_typeschema, target_typename, scope_tabschema, scope_tabname from syscat.columns where tabschema = 'TAB_1_1' and tabname = 'TAB_SCOPE_EQ'" TABSCHEMA TABNAME COLNAME TYPENAME TARGET_TYPESCHEMA TARGET_TYPENAME SCOPE_TABSCHEMA SCOPE_TABNAME ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- TAB_1_1 TAB_SCOPE_EQ COL1 REFERENCE TAB_1_1 T_UDST TAB_1_1 TAB_REF_SCOPE 1 record(s) selected. Once the column is renamed as below, the data types under the columns becomes NULL. --> ALTER TABLE "TAB_1_1"."TAB_SCOPE_EQ" RENAME COLUMN "COL1" TO "COL1NEW"; db2 "select tabschema, tabname, colname, typename, target_typeschema, target_typename, scope_tabschema, scope_tabname from syscat.columns where tabschema = 'TAB_1_1' and tabname = 'TAB_SCOPE_EQ'" TABSCHEMA TABNAME COLNAME TYPENAME TARGET_TYPESCHEMA TARGET_TYPENAME SCOPE_TABSCHEMA SCOPE_TABNAME ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------------------------------------------------------------- TAB_1_1 TAB_SCOPE_EQ COL1NEW REFERENCE - - - - 1 record(s) selected. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * Data type under the table columns becomes NULL after * * Renaming the column using the ALTER TABLE statement. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 5. * **************************************************************** | |
Local-Fix: | |
You can rename the column to the correct name using the ALTER TABLE statement. | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 Version 9.7 Fix Pack 5. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 06.07.2011 14.12.2011 14.12.2011 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP5 | |
Problem behoben lt. FixList in der Version | |
9.7.0.5 |