Steve Schiltz
2010-10-25 09:34:23 UTC
Hi everybody,
we're using Powerdesigner to document, maintain and create DB2 tables
(DB2 8.1 for MVS) by using ddl scripts generated out of PD. Our
reporting datawarehouse consists mainly of two types of tables:
1) the daily ones (for which I've managed to create correct ddl's
which were accepted by the DBA);
2) the monthly tables which are in fact unloads of the corresponding
daily tables in order to keep a history at the end of month.
Those monthly tables are aimed to keep 3 years of data, in 36
partitions. The partition key is made out of two columns, VALANE
(year / char(4)) and NUMMOI (month / char(2)). We use a system of
partition rolling that automatically when all the partitions are used
will push out the oldest one, roll all of the others one step up and
create empty space for the new data (using logical and physical
partitions).
Currently the ddl of such a table would be something like:
CREATE TABLE XXXX.ABCDEF
(NUMMOI CHAR(2) FOR SBCS DATA NOT NULL,
VALANE CHAR(4) FOR SBCS DATA NOT NULL,
COLUMN1 CHAR(2) FOR SBCS DATA NOT NULL WITH DEFAULT,
...
...)
IN XXXX.ABCDEFS
PARTITION BY
(VALANE ASC,
NUMMOI ASC)
(PART 1 VALUES ('2010', '01'),
PART 2 VALUES ('2010', '02'),
.....)
On the tablespace side the ddl looks like:
CREATE LARGE TABLESPACE ABDCEFS
IN XXXX
...
NUMPARTS 36
(PART 1 USING STOGROUP ......,
PART 2 USING STOGROUP .....,
...)
Question :
Does anyone know how to generate this kind of ddl with the help of PD?
Regards
Steve
we're using Powerdesigner to document, maintain and create DB2 tables
(DB2 8.1 for MVS) by using ddl scripts generated out of PD. Our
reporting datawarehouse consists mainly of two types of tables:
1) the daily ones (for which I've managed to create correct ddl's
which were accepted by the DBA);
2) the monthly tables which are in fact unloads of the corresponding
daily tables in order to keep a history at the end of month.
Those monthly tables are aimed to keep 3 years of data, in 36
partitions. The partition key is made out of two columns, VALANE
(year / char(4)) and NUMMOI (month / char(2)). We use a system of
partition rolling that automatically when all the partitions are used
will push out the oldest one, roll all of the others one step up and
create empty space for the new data (using logical and physical
partitions).
Currently the ddl of such a table would be something like:
CREATE TABLE XXXX.ABCDEF
(NUMMOI CHAR(2) FOR SBCS DATA NOT NULL,
VALANE CHAR(4) FOR SBCS DATA NOT NULL,
COLUMN1 CHAR(2) FOR SBCS DATA NOT NULL WITH DEFAULT,
...
...)
IN XXXX.ABCDEFS
PARTITION BY
(VALANE ASC,
NUMMOI ASC)
(PART 1 VALUES ('2010', '01'),
PART 2 VALUES ('2010', '02'),
.....)
On the tablespace side the ddl looks like:
CREATE LARGE TABLESPACE ABDCEFS
IN XXXX
...
NUMPARTS 36
(PART 1 USING STOGROUP ......,
PART 2 USING STOGROUP .....,
...)
Question :
Does anyone know how to generate this kind of ddl with the help of PD?
Regards
Steve