Prev: Purging in table partition9.7 with global indexes.
Next: Alter GENERATED ALWAYS Column in Table
From: Troels Arvin on 12 Aug 2010 09:30 Hello, In a generation 7 DB2 database, I need to adjust the counter for the next GENERATED ALWAYS AS IDENTITY value for a table. But I can't make it work: db2 "ALTER TABLE remindervalue ALTER COLUMN id RESTART WITH 923" DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0104N An unexpected token "RESTART WITH 923" was found following "ALUE ALTER COLUMN id". Expected tokens may include: "<space>". SQLSTATE=42601 db2level DB21085I Instance "db2inst1" uses DB2 code release "SQL07010" with level identifier "02010105" and informational tokens "DB2 v7.1.0", "s000510" and "". How are such counters adjusted in DB2 generation 7? (And please don't bully me regarding the old software which I currently have to work with...) -- Troels
From: Troels Arvin on 12 Aug 2010 10:57 Hello, Earlier, I wrote: > In a generation 7 DB2 database, I need to adjust the counter for the > next GENERATED ALWAYS AS IDENTITY value for a table. But I can't make it > work [...] I installed FP3 for DB2 v. 7.1, and then the "ALTER TABLE ... ALTER COLUMN ... RESTART ..." syntax worked. -- Troels
From: Serge Rielau on 12 Aug 2010 11:57 On 8/12/2010 10:57 AM, Troels Arvin wrote: > Hello, > > Earlier, I wrote: >> In a generation 7 DB2 database, I need to adjust the counter for the >> next GENERATED ALWAYS AS IDENTITY value for a table. But I can't make it >> work > [...] > > I installed FP3 for DB2 v. 7.1, and then the "ALTER TABLE ... ALTER > COLUMN ... RESTART ..." syntax worked. > I think 7.1 FP3 = 7.2. Seems like we added it then. That's a loooong time ago. -- Serge Rielau SQL Architect DB2 for LUW IBM Toronto Lab
|
Pages: 1 Prev: Purging in table partition9.7 with global indexes. Next: Alter GENERATED ALWAYS Column in Table |