DB2 - Problem description
Problem IC78550 | Status: Closed |
TBE DB2LOOK TOOL DOESN'T PRODUCE PROPER DDL FOR TABLES WITH PARENTHESIS IN THE TABLE NAME | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
Tbe db2look tool doesn't produce proper DDL for tables with parenthesis in the table name. The DDL produced will have extra spaces that will cause the table to be misnamed if this DDL is used to recreate. A simple example: db2sampl echo "connect to sample;" > badtab.sql echo 'CREATE TABLE "BADTABLE(THESE)" (myint int);' >> badtab.sql db2 -tvf badtab.sql db2look -d sample -e -o outfile.ddl Produces this DDL: $ grep -iA2 badtable outfile.ddl -- DDL Statements for table "MSLV97 "."BADTABLE(THESE)" ------------------------------------------------ CREATE TABLE "MSLV97 "."BADTABLE ( THESE)" ( "MYINT" INTEGER ) IN "IBMDB2SAMPLEREL" ; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users with parenthesis in table names * **************************************************************** * PROBLEM DESCRIPTION: * * The db2look tool doesn't produce proper DDL for tables with * * * * parenthesis in the table name. The DDL produced will have * * extra * * spaces that will cause the table to be misnamed if this DDL * * is * * used to recreate. * * * * * * * * A simple example: * * * * db2sampl * * * * echo "connect to sample;" > badtab.sql * * * * echo 'CREATE TABLE "BADTABLE(THESE)" (myint int);' >> * * badtab.sql * * db2 -tvf badtab.sql * * * * db2look -d sample -e -o outfile.ddl * * * * * * * * Produces this DDL: * * * * $ grep -iA2 badtable outfile.ddl * * * * -- DDL Statements for table "MSLV97 "."BADTABLE(THESE)" * * * * ------------------------------------------------ * * * * * * * * CREATE TABLE "MSLV97 "."BADTABLE ( * * * * THESE)" ( "MYINT" INTEGER ) * * * * IN "IBMDB2SAMPLEREL" ; * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.5 FP9 or newer * **************************************************************** | |
Local Fix: | |
Manually fix the DDL that is produced | |
Solution | |
DDL will be created properly with DB2 v9.5 FP9 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 07.09.2011 12.03.2012 12.03.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP9 | |
Problem solved according to the fixlist(s) of the following version(s) |