DB2 Identity coumns - GENERATE clause

9 views
Skip to first unread message

Robin W

unread,
Dec 15, 2009, 7:25:22 AM12/15/09
to DB Solo
Good Afternoon,
I've a small issue where if I generate a script for a table with an
identity column defined as 'GENERATE BY DEFAULT' DB Solo generates the
DDL as 'GENERATE ALWAYS'. I'm using DB Solo 3.8 and DB2 UDB 9.5 Fix
pack 4

cheers,

Robin

DB Solo

unread,
Dec 15, 2009, 7:39:43 AM12/15/09
to db-...@googlegroups.com
Can you post the original CREATE TABLE statement that would
demonstrate the problem?

Marko
> --
>
> You received this message because you are subscribed to the Google Groups "DB Solo" group.
> To post to this group, send email to db-...@googlegroups.com.
> To unsubscribe from this group, send email to db-solo+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/db-solo?hl=en.
>
>
>

Robin W

unread,
Dec 15, 2009, 9:08:30 AM12/15/09
to DB Solo
example of table that demo's the issue below

cheers,
Robin

DDL used to create table


CREATE TABLE TEST_ID_GENERATE (ID_COLUMN INT NOT NULL
GENERATED BY DEFAULT AS IDENTITY (START
WITH 1,

INCREMENT BY 1,
NO
CYCLE,
CACHE
20),
ANOTHER_COLUMN INTEGER NOT NULL)

script created by DB Solo

--
-- DB2ADMIN.TEST_ID_GENERATE
--

CREATE TABLE TEST_ID_GENERATE (ID_COLUMN INTEGER NOT NULL
GENERATED ALWAYS AS
IDENTITY (START WITH 1,

INCREMENT BY 1,

MINVALUE 1,

MAXVALUE 2147483647,

NO CYCLE,

CACHE 20),
ANOTHER_COLUMN INTEGER NOT NULL)
IN TSI4K;


GRANT CONTROL ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN;
GRANT SELECT ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT UPDATE ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT INSERT ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT DELETE ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT REFERENCES ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT ALTER ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
GRANT INDEX ON DB2ADMIN.TEST_ID_GENERATE TO DB2ADMIN WITH GRANT
OPTION;
> > For more options, visit this group athttp://groups.google.com/group/db-solo?hl=en.- Hide quoted text -
>
> - Show quoted text -

DB Solo

unread,
Dec 15, 2009, 4:41:18 PM12/15/09
to db-...@googlegroups.com
This should be fixed now. Please download the latest version from
dbsolo.com/preview and give it a try.
Reply all
Reply to author
Forward
0 new messages