zOs/TX/PER22DDL
-- testcase tnz240 repartitionierung -------------------------
set current sqlid = 'S100447';
DROP TABLESPACE $db.aPer22ts ;
DROP TABLESPACE $db.aPer22tb ;
DROP TABLESPACE $db.aPer22co ;
COMMIT ;
;
$@[
if $phase >= 1 then $@=[
--
CREATE TABLESPACE aPer22ts
IN $db
USING STOGROUP $stoGr1
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 0
GBPCACHE CHANGED
TRACKMOD NO
LOGGED
SEGSIZE 64
BUFFERPOOL BP2
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID unicode
DEFINE YES
MAXROWS 255;
--
CREATE TABLE $creator.tper22Ts
as (select * from sysibm.sysTableSpace) with no data
in $db.aPer22ts
;
CREATE INDEX $creator.iper22ts1
ON $creator.tper22ts
(dbName, Name)
USING STOGROUP $stoGr1
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE INDEX $creator.iper22ts2
ON $creator.tper22ts
(partitions, dbName, name)
USING STOGROUP $stoGr1
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE TABLESPACE aPer22tb
IN $db
USING STOGROUP $stoGr2
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 0
GBPCACHE CHANGED
TRACKMOD NO
LOGGED
SEGSIZE 64
BUFFERPOOL BP2
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID unicode
DEFINE YES
MAXROWS 255;
--
CREATE TABLE $creator.tper22Tb
as (select * from sysibm.sysTables) with no data
in $db.aPer22tb
;
CREATE INDEX $creator.iper22tb1
ON $creator.tper22tb
(creator, name)
USING STOGROUP $stoGr2
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE INDEX $creator.iper22tb2
ON $creator.tper22tb
(dbName, name)
USING STOGROUP $stoGr2
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE TABLESPACE aPer22co
IN $db
USING STOGROUP $stoGr3
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 0
GBPCACHE CHANGED
TRACKMOD NO
LOGGED
SEGSIZE 64
BUFFERPOOL BP32K
LOCKSIZE ANY
LOCKMAX SYSTEM
CLOSE YES
COMPRESS YES
CCSID unicode
DEFINE YES
MAXROWS 255;
--
CREATE TABLE $creator.tper22Co
as (select * from sysibm.sysColumns) with no data
in $db.aPer22co
;
CREATE INDEX $creator.iper22co1
ON $creator.tper22co
(tbcreator, tbname, name)
USING STOGROUP $stoGr3
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
CREATE INDEX $creator.iper22co2
ON $creator.tper22co
(coltype, name, tbcreator, tbName)
USING STOGROUP $stoGr3
PRIQTY -1 SECQTY -1
FREEPAGE 0 PCTFREE 10
GBPCACHE CHANGED
NOT CLUSTER
COMPRESS NO
BUFFERPOOL BP1
CLOSE YES
COPY NO
DEFER NO
DEFINE YES;
commit;
$@do c=1 to 3 $@=[
insert into $creator.tPer22Ts
select * from sysibm.sysTablespace;
commit;
insert into $creator.tPer22tb
select * from sysibm.sysTables;
commit;
insert into $creator.tPer22co
select * from sysibm.sysColumns;
commit;
$]
$@do d=1 to -1 $@=[
insert into $creator.tPer22Ts
select * from $creator.tPer22Ts ;
commit;
insert into $creator.tPer22tb
select * from $creator.tPer22tb ;
commit;
insert into $creator.tPer22co
select * from $creator.tPer22co ;
commit;
$]
$]
$]