home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC83060 Status: Closed

AN 'ALTER TABLE, ALTER COLUMN RESTART XXX" DDL STATEMENT IS NOT
BEING CAPTURED IN DB2LOOK UNTIL AN ACTUAL VALUE HAS BEEN INSERTE

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
An 'alter table, alter column restart xxx" DDL statement is not 
being captured in db2look until an actual value has been 
inserted. 
 
How to Reproduce: 
------------------ 
1. db2 "create table test(a integer generated by default as 
identity, b integer)" 
 
DB20000I  The SQL command completed successfully. 
 
 
 
2. db2 "insert into test(a,b) values (400,400),(500,500)" 
 
DB20000I  The SQL command completed successfully. 
 
 
 
3. db2look -d sample -e -t test -nofed 
 
------------------------------------------------ 
 
-- DDL Statements for table "DB297   "."TEST" 
 
------------------------------------------------ 
 
CREATE TABLE "DB297   "."TEST"  ( 
                  "A" INTEGER NOT NULL GENERATED BY DEFAULT AS 
IDENTITY 
( 
 
                    START WITH +1 
 
                    INCREMENT BY +1 
 
                    MINVALUE +1 
 
                    MAXVALUE +2147483647 
 
                    NO CYCLE 
 
                    CACHE 20 
 
                    NO ORDER ) , 
 
                  "B" INTEGER ) 
 
                 IN "IBMDB2SAMPLEREL" ; 
 
 
 
COMMIT WORK; 
 
CONNECT RESET; 
 
TERMINATE; 
 
 
 
4. db2 alter table test alter column a restart with 1000 
 
DB20000I  The SQL command completed successfully. 
 
 
 
5. db2look -d sample -e -t test -nofed 
 
 
 
Shows: 
 
------------------------------------------------ 
 
CREATE TABLE "DB297   "."TEST"  ( 
 
                  "A" INTEGER NOT NULL GENERATED BY DEFAULT AS 
IDENTITY 
( 
 
                    START WITH +1 
 
                    INCREMENT BY +1 
 
                    MINVALUE +1 
 
                    MAXVALUE +2147483647 
 
                    NO CYCLE 
 
                    CACHE 20 
 
                    NO ORDER ) , 
 
                  "B" INTEGER ) 
 
                 IN "IBMDB2SAMPLEREL" ; 
 
COMMIT WORK; 
 
Note:  No restart DDL at this point. 
 
------------------------------------------------ 
 
6. But if we insert it picks it up: 
 
 
 
$ db2 "insert into test(b) values (4000),(5000)" 
 
DB20000I  The SQL command completed successfully. 
 
------------------------------------------------ 
 
CREATE TABLE "DB297   "."TEST"  ( 
 
                  "A" INTEGER NOT NULL GENERATED BY DEFAULT AS 
IDENTITY 
( 
 
                    START WITH +1 
 
                    INCREMENT BY +1 
 
                    MINVALUE +1 
 
                    MAXVALUE +2147483647 
 
                    NO CYCLE 
 
                    CACHE 20 
 
                    NO ORDER ) , 
 
                  "B" INTEGER ) 
 
                 IN "IBMDB2SAMPLEREL" ; 
 
ALTER TABLE "DB297   "."TEST" ALTER COLUMN "A" RESTART WITH 
1039; 
COMMIT WORK; 
------------------------------------------------
Problem Summary:
Local Fix:
Insert one row before issuing db2look.
available fix packs:
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Workaround
not known / see Local fix
Comment
The problem fixed
BUG-Tracking
forerunner  : APAR is sysrouted TO one or more of the following: IC88635 IT06417 
follow-up : 
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
02.05.2012
29.03.2013
29.03.2013
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.7 FixList