-- Licensed Materials - Property of IBM
--
-- BI and PM: CM
--
-- (C) Copyright IBM Corp. 2008, 2020
--
-- US Government Users Restricted Rights - Use, duplication or disclosure
-- restricted by GSA ADP Schedule Contract with IBM Corp.

-- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
-- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).


create table CMOBJECTS (
	CMID			integer not null ,
	PCMID			integer not null ,
	VERSION			integer default 1 not null ,
	CREATED			timestamp not null ,
	MODIFIED		timestamp not null ,
	DISABLED		smallint,
	CLASSID			integer not null,
	DISPSEQ			integer default 0 not null,
	OWNER			integer, 
	TENANTID		integer default 0 not null,
	constraint PK_CMOBJECTS primary key (CMID),
	constraint PK_CMPARENT unique (CMID, PCMID)
) IN CMSCRIPT_CREATE_IN;

create index IDX_CLASS on CMOBJECTS(CLASSID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_CLASS1 on CMOBJECTS(CMID, CLASSID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_PARENT on CMOBJECTS(PCMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_CREATED on CMOBJECTS(CREATED) USING STOGROUP CMSCRIPT_STOGROUP;

create unique index PK_CMOBJECTS on CMOBJECTS(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create unique index PK_CMPARENT on CMOBJECTS(CMID, PCMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJNAMES (
	CMID			integer			not null,
	LOCALEID		smallint		not null,
	MAPDLOCALEID	smallint,
	ISDEFAULT		decimal(1, 0)	not null,
	NAME			varchar(255)	not null,
	constraint		PK_CMOBJNAMES	primary key (CMID, LOCALEID)
) IN CMSCRIPT_CREATE_IN;

create unique index PK_CMOBJNAMES on CMOBJNAMES (CMID,LOCALEID) USING STOGROUP CMSCRIPT_STOGROUP;
		
create table CMDATA (
	CMID			integer not null ,
	CONTENTTYPE		varchar (256),
	DATASIZE		bigint,
	DATACOMP		decimal(1, 0) default 0 not null,
	DATAPROP		blob(1G), 
	DATAURI			varchar(256),
	RESOURCETYPE	varchar (32),
	constraint PK_CMDATA2 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMDATA2 ON CMDATA (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB109
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML109
   STORES CMDATA
   COLUMN DATAPROP;

CREATE  UNIQUE  INDEX CMIDX109 ON CMATB109 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMARCHIVESTATUS (
	CMID			integer not null,
	ARCHSTAT		smallint default 0 not null, 
	CONSTRAINT PK_CMARCHIVESTATUS PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMARCHIVESTATUS ON CMARCHIVESTATUS (CMID) USING STOGROUP CMSCRIPT_STOGROUP;
  
CREATE TABLE CMSTOREIDS (
	CMID        integer not null,
	STOREID     char(33),
	CONSTRAINT PK_CMSTOREIDS PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMSTOREIDS ON CMSTOREIDS (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS1 (
	CMID				integer not null,
	BUSPHONE			varchar (32),
	COMMONNAME			varchar (64),
	EMAIL				varchar (128),
	FAXPHONE			varchar (32),
	GIVENNAME			varchar (128),
	HOMEPHONE			varchar (32),
	MOBILEPHONE			varchar (32),
	PAGERPHONE			varchar (32),
	PADDRESS			varchar (512),
	SURNAME				varchar (128),
	TIMEZONE			varchar (128),
	CLOCALEID			smallint ,
	PRODLOCALE			varchar (64),
	OBJID				varchar (1024),
	USEACCESSIBILITY		decimal(1, 0) default 0 ,
	USERNAME			varchar (128),
	ORIENTATION			smallint,
	HORIZRENDERLIMIT	integer,
	VERTRENDERLIMIT		integer,
	MOBILEDEVID			varchar (512),
	NOTIFICATIONEMAIL		varchar (512),
	constraint PK_CMOBJPROPS1 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS1 ON CMOBJPROPS1(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS10 (
	CMID			integer not null ,
	CONTACTEMAIL	varchar (128) ,
	CONTACT			clob (4000), 
	constraint PK_CMOBJPROPS10 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS10 ON CMOBJPROPS10 (CMID) 
USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB006 
IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML006
   STORES CMOBJPROPS10
   COLUMN CONTACT;

CREATE  UNIQUE  INDEX CMIDX006 ON CMATB006 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS11 (
	CMID			integer not null ,
	STATUSID		smallint,
	EVENTID			varchar(45),
	OWNEREVENTID		varchar(45),
	DISPATCHERID		varchar(50),
	MAXDETAILSEVTY		smallint,
	SCHEDTRIGNAME		varchar(512),
	SCHEDTYPE		smallint,
	RESTARTEVENTID		varchar(45),
	CONSTRAINT PK_CMOBJPROPS11 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS11 ON CMOBJPROPS11 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_OWNEREVENTID on CMOBJPROPS11(OWNEREVENTID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_RESTARTID on CMOBJPROPS11(RESTARTEVENTID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS13 (
	CMID			integer not null,
	ORD			integer not null,
	PARMNAME		varchar(512) not null,
	CPARMVALUE		blob(1G),
	constraint PK_CMOBJPROPS13 primary key (CMID, ORD)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS13 ON CMOBJPROPS13 (CMID ASC ,ORD ASC ) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB007
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML007
   STORES CMOBJPROPS13
   COLUMN CPARMVALUE;
 
CREATE  UNIQUE  INDEX CMIDX007 ON CMATB007 USING STOGROUP CMSCRIPT_STOGROUP;
 
create table CMOBJPROPS14 (
	CMID			integer not null,
	RELATED			clob(1G),
	MYPAGE			clob(1G),
	RETENTION		clob(1G),
	RECIPSEMAIL		clob(1G),
	CONSTRAINT PK_CMOBJPROPS14 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS14 ON CMOBJPROPS14 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB008
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML008
   STORES CMOBJPROPS14
   COLUMN RELATED;

CREATE  UNIQUE  INDEX CMIDX008 ON CMATB008 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB009
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML009
   STORES CMOBJPROPS14
   COLUMN MYPAGE;

CREATE  UNIQUE  INDEX CMIDX009 ON CMATB009 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB010
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML010
   STORES CMOBJPROPS14
   COLUMN RETENTION;

CREATE  UNIQUE  INDEX CMIDX010 ON CMATB010 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB011
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML011 
   STORES CMOBJPROPS14
   COLUMN RECIPSEMAIL;

CREATE  UNIQUE  INDEX CMIDX011 ON CMATB011 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS15 (
	CMID			integer not null,
	BRSHIAFFINECONS	integer,
	BRSAFFINECONS		integer,
	BRSMAXPROCS		integer,
	METADATAMODEL	clob(4000),
	BRSEXECTIMELIMIT	integer,
	BRSDATASOURCECHG	timestamp,
	constraint PK_CMOBJPROPS15 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS15 ON CMOBJPROPS15(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB012
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML012
   STORES CMOBJPROPS15
   COLUMN METADATAMODEL;
   
CREATE  UNIQUE  INDEX CMIDX012 ON CMATB012 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS16 (
	CMID			integer not null,
	RSHIAFFINECONS	integer,
	RSAFFINECONS		integer,
	RSMAXPROCS		integer,
	RSQUEUELIMIT		integer,
	RUNNINGSTATE	smallint,
	ADVSETTINGS		clob(4000),
	RSEXECTIMELIMIT	integer,
	ROUTINGTABLE	blob(1M), 
	constraint PK_CMOBJPROPS16 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS16 ON CMOBJPROPS16 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB013
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML013
   STORES CMOBJPROPS16
   COLUMN ROUTINGTABLE;

CREATE  UNIQUE  INDEX CMIDX013 ON CMATB013 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB014
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML014
   STORES CMOBJPROPS16
   COLUMN ADVSETTINGS;

CREATE  UNIQUE  INDEX CMIDX014 ON CMATB014 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS17 (
	CMID				integer not null,
	NONPEAKBEGINHOUR	smallint,
	NONPEAKMAXJOBS		integer,
	PEAKBEGINHOUR		smallint,
	PEAKMAXJOBS			integer,
	NEWNONPEAKBEGINHOUR	smallint,
	NEWNONPEAKMAXJOBS		integer,
	NEWPEAKBEGINHOUR		smallint,
	NEWPEAKMAXJOBS			integer,
	USERCAPABILITY		smallint,
	STARTACTIVE			decimal(1, 0),
	COMPONENTID 		smallint,
	PREVIMGLOCATION		varchar(255),
	RESRCELOCATION		varchar(255),
	constraint PK_CMOBJPROPS17 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS17 ON CMOBJPROPS17 (CMID)	USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS18 (
	CMID				integer not null,
	OUTPUTREFS			clob(1M),
	PATHS				clob(1M),
	constraint PK_CMOBJPROPS18 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS18 ON CMOBJPROPS18 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB015 
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML015
   STORES CMOBJPROPS18
   COLUMN OUTPUTREFS;

CREATE  UNIQUE  INDEX CMIDX015 ON CMATB015 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB016
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML016
   STORES CMOBJPROPS18
   COLUMN PATHS;
   
CREATE  UNIQUE  INDEX CMIDX016 ON CMATB016 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS2 (
	CMID			integer not null,
	TASKID			varchar(32),
	STARTDATE		timestamp,
	ENDDATE			timestamp,
	ENDTYPE			smallint,
	EVERYNPERIODS	integer,
	DAILYPERIOD		smallint,
	MONTHLYABSDAY	smallint,
	MONTHLYRELDAY	smallint,
	MONTHLYRELWEEK	smallint,
	TYPE			smallint,
	YEARLYABSDAY	smallint,
	YEARLYABSMONTH	smallint,
	YEARLYRELDAY	smallint,
	YEARLYRELMONTH	smallint,
	YEARLYRELWEEK	smallint,
	ACTIVE			decimal(1, 0) default 0 not null,
	WEEKLYMONDAY	decimal(1, 0) default 0 not null,
	WEEKLYTUESDAY	decimal(1, 0) default 0 not null,
	WEEKLYWEDNESDAY	decimal(1, 0) default 0 not null,
	WEEKLYTHURSDAY	decimal(1, 0) default 0 not null,
	WEEKLYFRIDAY	decimal(1, 0) default 0 not null,
	WEEKLYSATURDAY	decimal(1, 0) default 0 not null,
	WEEKLYSUNDAY	decimal(1, 0) default 0 not null, 
	PRIORITY	integer,
	INTRARECURSTART		char (13),
	INTRARECUREND		char (13),
	INTRARECURINTERVAL	varchar (50),
	constraint PK_CMOBJPROPS2 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS2 ON CMOBJPROPS2(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_TASKID on CMOBJPROPS2(TASKID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_PRIORITY on CMOBJPROPS2(PRIORITY) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS20 (
	CMID               integer not null,
	EXECLOCALEID       smallint,
	EXECFORMAT         smallint,
	EXECPAGEORIENT     smallint,
	EXECPROMPT         decimal(1, 0) default 1 not null,
	DEFPORTACT         smallint,
	ALLOWSUBSCRIBE     decimal(1, 0),
	ALLOWNOTIFICATION  decimal(1, 0),
	OBJREFS            clob(1M),
	constraint PK_CMOBJPROPS20 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS20 ON CMOBJPROPS20 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB134
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML134
   STORES CMOBJPROPS20
   COLUMN OBJREFS;

CREATE UNIQUE INDEX CMIDX134 ON CMATB134 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS23 (
	CMID			integer not null,
	LSAUDITADMINLVL	smallint,
	LSAUDITLVL		smallint,
	LSAUDITOTHERLVL	smallint,
	LSAUDITUSAGELVL	smallint,
	LSAUDITNATIVEQRY	decimal(1, 0),
	QSRMEMCACHEROOT 	varchar(255),
	constraint PK_CMOBJPROPS23 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS23 ON CMOBJPROPS23 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS24 (
	CMID			integer not null,
	LOCATION		varchar(1024),
	MODELNAME		varchar(512),
	PRINTERADDRESS	varchar(2048),
	constraint PK_CMOBJPROPS24 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS24 ON CMOBJPROPS24 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS25 (
	CMID				integer not null,
	DEPLOYOBJECT		clob (4000),
	DEPLOYOBJANC		clob(1M),
	DEPLOYOBJCLASSID	integer,
	DEPLOYOBJDEFNAME	varchar(255),
	DEPLOYOBJDEFSTATUS	smallint,
	DEPLOYOBJUSAGE		smallint,
	MESSAGE				blob(1M),
	constraint PK_CMOBJPROPS25 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS25 ON CMOBJPROPS25 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB095
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML095
   STORES CMOBJPROPS25
   COLUMN DEPLOYOBJECT;
   
CREATE  UNIQUE  INDEX CMIDX095 ON CMATB095 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB017
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML017
   STORES CMOBJPROPS25
   COLUMN DEPLOYOBJANC;

CREATE  UNIQUE  INDEX CMIDX017 ON CMATB017 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB018
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML018
   STORES CMOBJPROPS25
   COLUMN MESSAGE;

CREATE  UNIQUE  INDEX CMIDX018 ON CMATB018 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS26 (
	CMID			integer not null,
	DELIVOPTIONS			clob(1M),
	constraint PK_CMOBJPROPS26 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS26 ON CMOBJPROPS26 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB019
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML019
   STORES CMOBJPROPS26
   COLUMN DELIVOPTIONS;

CREATE  UNIQUE  INDEX CMIDX019 ON CMATB019 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS27 (
	CMID				integer not null,
	CUBECONTNAME			varchar (2048),
	GATEWAY				varchar (1024),
	HASPROMPTS			decimal(1, 0) default 0 not null,
	PPOPTIONS			clob (4000),
	DATABLOCKS			blob(1G),
	PPDEFPORTACT			smallint,
	constraint PK_CMOBJPROPS27 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS27  ON CMOBJPROPS27(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB020
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML020
   STORES CMOBJPROPS27
   COLUMN PPOPTIONS;

CREATE UNIQUE INDEX CMIDX020  ON CMATB020 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE AUXILIARY TABLE CMATB021
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML021
   STORES CMOBJPROPS27
   COLUMN DATABLOCKS;

CREATE UNIQUE INDEX CMIDX021  ON CMATB021 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS28 (
	CMID            integer not null,
	EVENTKEY        clob (4000),
	EVENTTYPES      clob (4000),
	FILTERDATAITEM	varchar (512),
	PARMASSIGN	blob(1M), 
	SEQUENCING	smallint,
	ALLOWNOTIFICATION decimal(1, 0),
	DEFPORTACTION		smallint,
	RUNCOND		smallint,
	SPEC		clob(1G),	
	constraint PK_CMOBJPROPS28 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS28 ON CMOBJPROPS28 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB022
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML022
   STORES CMOBJPROPS28
   COLUMN EVENTKEY;
   
CREATE UNIQUE INDEX CMIDX022 ON CMATB022 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB023
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML023
   STORES CMOBJPROPS28
   COLUMN EVENTTYPES;
   
CREATE UNIQUE INDEX CMIDX023 ON CMATB023 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB024
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML024
   STORES CMOBJPROPS28
   COLUMN PARMASSIGN;
   
CREATE UNIQUE INDEX CMIDX024 ON CMATB024 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB025
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML025
   STORES CMOBJPROPS28
   COLUMN SPEC;
   
CREATE UNIQUE INDEX CMIDX025 ON CMATB025 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS3 (
	CMID			integer not null,
	PROPNAME		varchar(50) not null,
	LOCALEID		smallint not null,
	VALUE			varchar (3700),
	ISDEFAULT		decimal(1, 0),
	MAPDLOCALEID		smallint,
	constraint PK_CMOBJPROPS3 primary key (CMID, PROPNAME, LOCALEID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS3 ON CMOBJPROPS3 (CMID, PROPNAME, LOCALEID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS30 (
	CMID            integer not null,
	HANDLE          varchar(255),
	BINDING         clob(1M),
	REGISTRATION    clob(1M),
	SERVICEDESCR    clob(1M),
	LAYOUT          clob(1M),
	REQUIREDCAP	clob(1M),
	CANCUSTOMIZE	decimal(1, 0),
	CONTEXT         clob(100M),
	DEPLOYREFS	clob(1M),
	constraint PK_CMOBJPROPS30 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS30 ON CMOBJPROPS30 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB026 
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML026 
   STORES CMOBJPROPS30
   COLUMN BINDING;
   
CREATE UNIQUE INDEX CMIDX026 ON CMATB026 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB027
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML027
   STORES CMOBJPROPS30
   COLUMN REGISTRATION;

CREATE UNIQUE INDEX CMIDX027 ON CMATB027 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB028
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML028
   STORES CMOBJPROPS30
   COLUMN SERVICEDESCR;

CREATE UNIQUE INDEX CMIDX028 ON CMATB028 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE AUXILIARY TABLE CMATB029
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML029
   STORES CMOBJPROPS30
   COLUMN LAYOUT;
   
CREATE UNIQUE INDEX CMIDX029 ON CMATB029 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB030
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML030
   STORES CMOBJPROPS30
   COLUMN REQUIREDCAP;

CREATE UNIQUE INDEX CMIDX030 ON CMATB030 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB031
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML031
   STORES CMOBJPROPS30
   COLUMN CONTEXT;

CREATE UNIQUE INDEX CMIDX031 ON CMATB031 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB032
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML032
   STORES CMOBJPROPS30
   COLUMN DEPLOYREFS;
   
CREATE UNIQUE INDEX CMIDX032 ON CMATB032 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS31 (
	CMID			integer not null,
	ASAUDITLVL		smallint,
	BRSAUDITLVL		smallint,
	CMSAUDITLVL		smallint,
	DISPAUDITLVL		smallint,
	DSAUDITLVL		smallint,
	EMSAUDITLVL		smallint,
	JSAUDITLVL		smallint,
	MDSAUDITLVL		smallint,
	MMSAUDITLVL		smallint,
	MSAUDITLVL		smallint,
	PACSAUDITLVL		smallint,
	PDSAUDITLVL		smallint,
	PRSAUDITLVL		smallint,
	PSAUDITLVL		smallint,
	PTSAUDITLVL		smallint,
	RSAUDITLVL		smallint,
	SSAUDITLVL		smallint,
	BRSAUDITNATIVEQRY	decimal(1, 0),
	RSAUDITNATIVEQRY	decimal(1, 0),
	DISAUDITLVL		smallint,
	RSDATASOURCECHG	timestamp,
	IDSAUDITLVL		smallint,
	ISSAUDITLVL		smallint,
	IUSAUDITLVL		smallint,
	RDSAUDITLVL		smallint,
	RDSMAXDATASIZE		integer,
	MBSAUDITLVL		smallint,
	DDSAUDITLVL		smallint,
	DDSLISPERPRCSR		integer,
	DMSAUDITLVL		smallint,
	MISAUDITLVL		smallint,
	MDSAFFINECONNECTIONS	integer,
	MDSNONAFFINECONNCTS	integer,
	MDSPEAKCONS		integer,
	MDSPEAKNONAFFINECONNCTS	integer,
	MDSPEAKMAXPROCS 	integer,	
	MDSMAXPROCESSES		integer,	
	MDSEXECUTIONTIMELIMIT	integer,	
	MDSQUEUELIMIT		integer,
	MDINFOURI		clob(4000),
	DIMSAUDITLVL        	integer,
	EVSAUDITLVL        	integer,
	GSAUDITLVL		integer,
	AASAUDITLVL     	smallint,
	HTSAUDITLVL		smallint,
	CMCSAUDITLVL		smallint,
	QSAUDITLVL		smallint,
	BCSAUDITLVL		smallint,
	CSAUDITLVL		smallint,
	FSAUDITLVL		smallint,
	STSAUDITLVL		smallint,
	ANSAUDITLVL		smallint,
	RMDSAUDITLVL		smallint,
	IDVIZAUDITLVL 	smallint,
	REPOSAUDITLVL 	smallint,
	SACAMAUDITLVL 	smallint,
	constraint PK_CMOBJPROPS31 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS31 ON CMOBJPROPS31 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB033
IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML033
STORES CMOBJPROPS31
COLUMN MDINFOURI;

CREATE  UNIQUE  INDEX CMIDX033 ON CMATB033 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS32 (
	CMID			integer not null,
	STOREDPROCNAME	varchar(255),
	constraint PK_CMOBJPROPS32 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS32 ON CMOBJPROPS32 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS33 (
	CMID           integer not null,
	NAME           varchar(255),
	USERID         varchar(1024),
	LASTLOGIN      timestamp,
	CAPABILITIES   varchar(64),
	LICENSE        smallint,
	constraint PK_CMOBJPROPS33 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS33 ON CMOBJPROPS33 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;


create table CMOBJPROPS34 (
	CMID			integer not null,
	ACTION			smallint,
	BOOKMARKITEM		varchar(255),
	BOOKMARKTEXT		varchar(255),
	DRILLPARMASSIGN		blob(1M),
	SCOPE			blob(1M),
	SPEC			clob(1G),	
	TARGETOPTIONS		clob(1M),
	DEPLOYREFS		clob(1M),
	constraint PK_CMOBJPROPS34 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS34 ON CMOBJPROPS34 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB034
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML034
   STORES CMOBJPROPS34
   COLUMN DRILLPARMASSIGN;

CREATE  UNIQUE  INDEX CMIDX034 ON CMATB034 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB035
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML035
   STORES CMOBJPROPS34
   COLUMN SCOPE;
   
CREATE  UNIQUE  INDEX CMIDX035 ON CMATB035 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB036
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML036
   STORES CMOBJPROPS34
   COLUMN SPEC;
   
CREATE  UNIQUE  INDEX CMIDX036 ON CMATB036 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB037
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML037
   STORES CMOBJPROPS34
   COLUMN TARGETOPTIONS;
   
CREATE  UNIQUE  INDEX CMIDX037 ON CMATB037 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB038
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML038
   STORES CMOBJPROPS34
   COLUMN DEPLOYREFS;
 
CREATE  UNIQUE  INDEX CMIDX038 ON CMATB038 USING STOGROUP CMSCRIPT_STOGROUP; 

create table CMOBJPROPS35 (
	CMID			integer not null,
	BINDINGNAME		varchar (512),
	INPUTMESSNAME		varchar (512),
	OPERATIONNAME		varchar (512),
	OUTPUTMESSNAME		varchar (512),
	SERVICENAME		varchar (512),
	BULKEVENTS		decimal(1, 0),
	constraint PK_CMOBJPROPS35 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS35 ON CMOBJPROPS35 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS36 (
	CMID			integer not null,
	ACTION			smallint,
	constraint PK_CMOBJPROPS36 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS36 ON CMOBJPROPS36 (CMID) USING STOGROUP CMSCRIPT_STOGROUP; 

create table CMOBJPROPS37 (
	CMID            integer not null,
	ROUTINGHINTS    clob (4000),
	PROFILESETTINGS clob (100K),
	PROFILERANK     integer with default 0 not null,
	constraint PK_CMOBJPROPS37 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS37 ON CMOBJPROPS37 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB039
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML039
   STORES CMOBJPROPS37
   COLUMN ROUTINGHINTS;
   
CREATE UNIQUE INDEX CMIDX039 ON CMATB039 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB129
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML129
   STORES CMOBJPROPS37
   COLUMN PROFILESETTINGS;
   
CREATE UNIQUE INDEX CMIDX129 ON CMATB129 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS38 (
	CMID				integer not null,
	CTITEMCOUNTDEFAULT	integer,
	CTITEMCOUNTLIMIT	integer,
	MBRITEMCOUNTDEFAULT	integer,
	MBRITEMCOUNTLIMIT	integer,
	constraint PK_CMOBJPROPS38 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS38 ON CMOBJPROPS38 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS39 (
	PROPID		smallint not null,
	CMID		integer not null ,
	VALUE		smallint not null
) IN CMSCRIPT_CREATE_IN;

create index IDX_CMOBJPROPS39 on CMOBJPROPS39 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;
	
create table CMOBJPROPS4 (
	CMID			integer not null,
	HEIGHT			varchar(20),
	WIDTH			varchar(20),
	UNIT			smallint, 
	constraint PK_CMOBJPROPS4 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS4 ON CMOBJPROPS4 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS40 (
	CMID			integer not null,
	APPGUID			varchar(50),
	APPID			varchar (512),
	APPSTATE		smallint,
	APPURL			clob (4000),
	constraint PK_CMOBJPROPS40 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS40 ON CMOBJPROPS40 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB040 
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML040
   STORES CMOBJPROPS40
   COLUMN APPURL;

CREATE  UNIQUE  INDEX CMIDX040 ON CMATB040 USING STOGROUP CMSCRIPT_STOGROUP; 
   
CREATE table CMOBJPROPS41 (
	CMID			integer not null,
	DEPTH			integer,
	ITEMID			varchar (512),
	PARENTID		varchar (512),
	CONSTRAINT PK_CMOBJPROPS41 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS41 ON CMOBJPROPS41 (CMID) USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE table CMOBJPROPS42 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS42 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS42 ON CMOBJPROPS42 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB041
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML041
   STORES CMOBJPROPS42
   COLUMN SPEC;
   
CREATE  UNIQUE  INDEX CMIDX041 ON CMATB041 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS43 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS43 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN; 

CREATE UNIQUE INDEX PK_CMOBJPROPS43 ON CMOBJPROPS43 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;  

CREATE AUXILIARY TABLE CMATB042
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML042
   STORES CMOBJPROPS43
   COLUMN SPEC;
   
CREATE  UNIQUE  INDEX CMIDX042 ON CMATB042 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS44 (
	CMID			integer not null,
	RDSGATEWMAPPING		blob(1M),
	CONSTRAINT PK_CMOBJPROPS44 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS44 ON CMOBJPROPS44 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB043
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML043
   STORES CMOBJPROPS44
   COLUMN RDSGATEWMAPPING;
   
CREATE  UNIQUE  INDEX CMIDX043 ON CMATB043 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS45 (
	CMID			integer not null,
	LINK			smallint,
	constraint PK_CMOBJPROPS45 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS45 ON CMOBJPROPS45(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS46 (
	CMID			integer not null,
	DOCTYPE			varchar (512),
	constraint PK_CMOBJPROPS46 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS46 ON CMOBJPROPS46 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS47 (
	CMID			integer not null,
	SYSTEMMETRIC		smallint,
	PROPERTIES		blob(1M),
	constraint PK_CMOBJPROPS47 primary key (CMID)
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS47 ON CMOBJPROPS47(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB044
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML044
   STORES CMOBJPROPS47
   COLUMN PROPERTIES;

CREATE  UNIQUE  INDEX CMIDX044 ON CMATB044 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS48 (
	CMID			integer not null,
	ASCONNECTIONS		integer,
	CMSCONNECTIONS		integer,
	DDSCONNECTIONS		integer,
	DISCONNECTIONS		integer,
	DSCONNECTIONS		integer,
	IDSCONNECTIONS		integer,
	ISSCONNECTIONS		integer,
	IUSCONNECTIONS		integer,
	JSCONNECTIONS		integer,
	MBSCONNECTIONS		integer,
	MMSCONNECTIONS		integer,
	PACSCONNECTIONS		integer,
	PDSCONNECTIONS		integer,
	PRSCONNECTIONS		integer,
	PTSCONNECTIONS		integer,
	BRSCHHOTSPOTLIMIT	integer,
	RSCHHOTSPOTLIMIT	integer,
	CAPACITY		float,
	LOADBALMODE		smallint,
	DMSCONNECTIONS		integer,
	MISCONNECTIONS 		integer,
	DSCOMPATTACHLIMIT	integer,
	QSDIAGENABLED		decimal(1, 0),
	QSMETENABLED		decimal(1, 0),
	QSQUERYEXECTR		decimal(1, 0),
	QSPLANTRC		decimal(1, 0),
	BCSAFFCONS		integer,
	BCSEXECLMT		integer,
	BCSMAXPROCS		integer,
	BCSNONAFFCONS		integer,
	BCSPEAKAFFCONS		integer,
	BCSPEAKMAXPROCS		integer,
	BCSPEAKNONAFFCONS	integer,
	CSAFFCONS		integer,
	CSEXECLMT		integer,
	CSMAXPROCS		integer,
	CSNONAFFCONS		integer,
	CSPEAKAFFCONS		integer,
	CSPEAKMAXPROCS		integer,
	CSPEAKNONAFFCONS	integer,
	FSAFFCONS		integer,
	FSEXECLMT		integer,
	FSCMAXPROCS		integer,
	FSNONAFFCONS		integer,
	FSPEAKAFFCONS		integer,
	FSPEAKMAXPROCS		integer,
	FSPEAKNONAFFCONS	integer,
	RMDSAFFCONS		integer,
	RMDSEXECLMT		integer,
	RMDSNONAFFCONS		integer,
	RMDSPEAKAFFCONS		integer,
	RMDSPEAKNONAFFCONS	integer,
	DASAUDITLVL		smallint,
	RMDSCONS  		integer,
	RMDSPEAKCONS 	integer,
	QSVERBGCLOGLIMIT 	integer,
	QSMDQUERYSIZELIMIT integer,
	QSGENCOMINNATSQL 	decimal(1, 0),
	QSDISVERBGCLOG 	decimal(1, 0),
	QSINITNURSESIZE 	integer,
	QSNURSESIZELIMIT 	integer,
	QSGCPOLICY 		smallint,
	REPOSCACHEOBJTTL	integer,
	REPOSNUMOBJDISK		integer,
	REPOSNUMOBJMEM		integer,
	MAXSTORESZMB		integer,
	constraint PK_CMOBJPROPS48 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS48 ON CMOBJPROPS48 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS49 (
	CMID			integer not null,
	URI				clob (4000),
	constraint PK_CMOBJPROPS49 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS49 ON CMOBJPROPS49 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB045
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML045
   STORES CMOBJPROPS49
   COLUMN URI;
 
CREATE  UNIQUE  INDEX CMIDX045 ON CMATB045 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS5 (
	CMID			integer not null,
	ACTEXECTIME		timestamp,
	ACTCOMPTIME		timestamp,
	REQEXECTIME		timestamp,
	USERREF			clob(4000), 
	DETAILTIME		timestamp,
	DETAIL			clob(1M),
	SEVERITY		smallint,
	DETAILTYPE		varchar(64),
	INFO			clob(64k), 
	constraint PK_CMOBJPROPS5 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

create index IDX_REQEXECTIME on CMOBJPROPS5(REQEXECTIME) USING STOGROUP CMSCRIPT_STOGROUP;

create unique index PK_CMOBJPROPS5 on CMOBJPROPS5(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB046
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML046
   STORES CMOBJPROPS5
   COLUMN USERREF;
   
CREATE  UNIQUE  INDEX CMIDX046 ON CMATB046 USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE AUXILIARY TABLE CMATB047
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML047
   STORES CMOBJPROPS5
   COLUMN DETAIL;

CREATE  UNIQUE  INDEX CMIDX047 ON CMATB047 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB139
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML139
   STORES CMOBJPROPS5
   COLUMN INFO;

CREATE UNIQUE INDEX CMIDX139 ON CMATB139 USING STOGROUP CMSCRIPT_STOGROUP;
 
create table CMOBJPROPS50 (
	CMID            integer not null,
	CONTEXT         blob(1G),
	CONTEXTCOUNT    integer,
	LASTPAGE        varchar(512),
	DATADESCRIPTOR  clob(16K),
	METADATA        blob(10M),
	constraint PK_CMOBJPROPS50 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS50 ON CMOBJPROPS50 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB048
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML048
   STORES CMOBJPROPS50
   COLUMN CONTEXT;
   
CREATE  UNIQUE  INDEX CMIDX048 ON CMATB048 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB127
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML127
   STORES CMOBJPROPS50
   COLUMN DATADESCRIPTOR;
   
CREATE  UNIQUE  INDEX CMIDX127 ON CMATB127 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB128
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML128
   STORES CMOBJPROPS50
   COLUMN METADATA;
   
CREATE  UNIQUE  INDEX CMIDX128 ON CMATB128 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS51 (
	CMID                 integer not null ,
	SERVERGROUP          varchar (512),
	RUNASOWNER           decimal(1, 0),
	CANBURST             decimal(1, 0),
	SCHEDTRIGNAME        varchar(255),
	RUNWITHOWNERCAPS     decimal(1, 0),
	QUERYMODE            clob(4000),
	RUNINADVANCEDVIEWER  decimal(1, 0),
	DSMODE               varchar(3000),
	CONSTRAINT PK_CMOBJPROPS51 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS51 ON CMOBJPROPS51 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB106
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML106
   STORES CMOBJPROPS51
   COLUMN QUERYMODE;
   
CREATE  UNIQUE  INDEX CMIDX106 ON CMATB106 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS52 (
	CMID             integer not null ,
	CONNECTSTR       varchar (2048),
	ISOLEVEL         smallint,
	QUALIFIER        smallint,
	REPLACEMENT      varchar (512),
	CLOSECONNECTCMD  clob(1M),
	OPENCONNECTCMD   clob(1M),
	CLOSESESSCMD     clob(1M),
	OPENSESSCMD      clob(1M),
	APITOKEN         clob(1M),
	NOTIFYONCHANGE   decimal(1, 0),
	CONSTRAINT PK_CMOBJPROPS52 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS52 ON CMOBJPROPS52 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB049
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML049
   STORES CMOBJPROPS52
   COLUMN OPENSESSCMD;

CREATE  UNIQUE  INDEX CMIDX049 ON CMATB049 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB050
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML050
   STORES CMOBJPROPS52
   COLUMN CLOSESESSCMD;
   
CREATE  UNIQUE  INDEX CMIDX050 ON CMATB050 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB051
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML051
   STORES CMOBJPROPS52
   COLUMN OPENCONNECTCMD;

CREATE  UNIQUE  INDEX CMIDX051 ON CMATB051 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB052
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML052
   STORES CMOBJPROPS52
   COLUMN CLOSECONNECTCMD;
   
CREATE  UNIQUE  INDEX CMIDX052 ON CMATB052 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB146
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML146
   STORES CMOBJPROPS52
   COLUMN APITOKEN;
   
CREATE  UNIQUE  INDEX CMIDX146 ON CMATB146 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS53 (
	CMID			integer not null ,
	SEQUENCING		smallint,
	CONSTRAINT PK_CMOBJPROPS53 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS53 ON CMOBJPROPS53 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS54 (
	CMID			integer not null ,
	FORMAT			smallint,
	OLOCALEID		smallint,
	CONSTRAINT PK_CMOBJPROPS54 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS54 ON CMOBJPROPS54(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS55 (
	CMID			integer not null,
	ICONURI			varchar (2000),
	UCPOLICIES		blob(1M), 
	HIDDEN			decimal(1, 0) default 0 not null,
	CONSTRAINT PK_CMOBJPROPS55 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS55 ON CMOBJPROPS55 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB053
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML053
   STORES CMOBJPROPS55
   COLUMN UCPOLICIES;

CREATE  UNIQUE  INDEX CMIDX053 ON CMATB053 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS56 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS56 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS56 ON CMOBJPROPS56 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;  

CREATE AUXILIARY TABLE CMATB054
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML054
   STORES CMOBJPROPS56
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX054 ON CMATB054 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE table CMOBJPROPS57 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS57 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS57 ON CMOBJPROPS57 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB055
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML055
   STORES CMOBJPROPS57
   COLUMN SPEC;
 
CREATE  UNIQUE  INDEX CMIDX055 ON CMATB055 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE table CMOBJPROPS58 (
	CMID			integer not null,
	PDSELISTAXSCACHE	integer,
	PDSSHOWCELLANN		decimal(1, 0),
	PDSMAXPROCS		integer,
	PPSHIAFFINECONS		integer,
	PPSAFFINECONS		integer,
	PPSAUDITLEVEL		smallint,
	PPSQUEUELIMIT		integer,
	PPSEXECTIMELIMIT	integer,
	BRSPDFCHARENC		smallint,
	BRSPDFCOMPRSLVL		integer,
	BRSPDFCOMPRSTYPE	smallint,
	BRSPDFEMBEDFONTS	smallint,
	RSPDFCHARENC		smallint,
	RSPDFCOMPRSLVL		integer,
	RSPDFCOMPRSTYPE		smallint,
	RSPDFEMBEDFONTS		smallint,
	DMSAFFINECONNECTIONS	integer,
	DMSEXECUTIONTIMELIMIT	integer,
	DMSMAXPROCESSES		integer,
	DMSNONAFFINECONNCTS	integer,
	DMSPEAKMAXPROCESSES	integer,
	DMSPEAKNONAFFINECONNCTS	integer,
	DMSQUEUELIMIT		integer,
	PERDOCVERSRETAGE	varchar (50),
	PERDOCVERSRETCOUNT	integer,
	EDITION			varchar(20),
	EDITIONS		blob(10M),
	DIMSAFFINECONNECTIONS   integer,
	DIMSEXECUTIONTIMELIMIT  integer,
   	DIMSMAXPROCESSES        integer,
	DIMSQUEUELIMIT          integer,
	GLOSSARYURI		clob (4000),
	GSAFFINECONNECTIONS		integer,
	GSEXECUTIONTIMELIMIT	integer,
	GSMAXPROCESSES			integer,
	GSNONAFFINECONNCTS		integer,
	GSPEAKMAXPROCESSES		integer,
	GSPEAKNONAFFINECONNCTS	integer,
	GSQUEUELIMIT			integer,
	GSPEAKCONS			integer,
	AASAFFINECONNECTIONS	integer,
	AASEXECUTIONTIMELIMIT   integer,
	AASMAXPROCESSES		    integer,
	HTSCOMPTASKLIFE		varchar (50),
	CMCSHEAPLIM		integer,
	ANSANNOTATIONLIFE	varchar (50),
	constraint PK_CMOBJPROPS58 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS58 ON CMOBJPROPS58(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB056
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML056
   STORES CMOBJPROPS58
   COLUMN EDITIONS;

CREATE  UNIQUE  INDEX CMIDX056 ON CMATB056 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB057
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML057
   STORES CMOBJPROPS58
   COLUMN GLOSSARYURI;

CREATE  UNIQUE  INDEX CMIDX057 ON CMATB057 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS59 (
	CMID			integer not null,
	CONFIGURATION		clob (1M),
	USERINTERFACE		smallint,
 	CONSTRAINT PK_CMOBJPROPS59 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS59 ON CMOBJPROPS59 (CMID) USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE AUXILIARY TABLE CMATB058
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML058
   STORES CMOBJPROPS59
   COLUMN CONFIGURATION;
   
CREATE  UNIQUE  INDEX CMIDX058 ON CMATB058 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS6 (
	CMID			integer not null,
	URI				clob (4000),
	TARGET			clob (4000),
	STEPOBJECT		clob (4000),
	BASE			clob (4000),
	CREDENTIAL		clob (4000),
	DISPATCHERPATH	varchar (3220),
	PAGE			clob (4000),
	CREDNAMESPACES	clob (4000),
	constraint PK_CMOBJPROPS6 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS6 ON CMOBJPROPS6 (CMID) USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE AUXILIARY TABLE CMATB059
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML059
   STORES CMOBJPROPS6
   COLUMN URI;

CREATE  UNIQUE  INDEX CMIDX059 ON CMATB059 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB060
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML060
   STORES CMOBJPROPS6
   COLUMN TARGET;

CREATE  UNIQUE  INDEX CMIDX060 ON CMATB060 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB061
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML061
   STORES CMOBJPROPS6
   COLUMN STEPOBJECT;

CREATE  UNIQUE  INDEX CMIDX061 ON CMATB061 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB062
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML062
   STORES CMOBJPROPS6
   COLUMN BASE;

CREATE  UNIQUE  INDEX CMIDX062 ON CMATB062 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB063
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML063
   STORES CMOBJPROPS6
   COLUMN CREDENTIAL;

CREATE  UNIQUE  INDEX CMIDX063 ON CMATB063 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB064
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML064
   STORES CMOBJPROPS6
   COLUMN PAGE;

CREATE  UNIQUE  INDEX CMIDX064 ON CMATB064 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB065
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML065
   STORES CMOBJPROPS6
   COLUMN CREDNAMESPACES;

CREATE  UNIQUE  INDEX CMIDX065 ON CMATB065 USING STOGROUP CMSCRIPT_STOGROUP;
 
create table CMOBJPROPS60 (
	CMID            integer not null,
	CONTEXT         blob(1G),
	CONTEXTCOUNT	integer,
	LASTPAGE	varchar(512),
	constraint PK_CMOBJPROPS60 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS60 ON CMOBJPROPS60 (CMID) USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE AUXILIARY TABLE CMATB066
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML066
   STORES CMOBJPROPS60
   COLUMN CONTEXT;

CREATE  UNIQUE  INDEX CMIDX066 ON CMATB066 USING STOGROUP CMSCRIPT_STOGROUP;
  
create table CMOBJPROPS61 (
	CMID			integer not null,
	BURSTKEY		varchar (3982),
	constraint PK_CMOBJPROPS61 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS61 ON CMOBJPROPS61 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS62 (
	CMID integer not null,
	EXPIRATION	timestamp,
	ALLOWANNOTATION 	decimal(1, 0),
	constraint PK_CMOBJPROPS62 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

create index IDX_EXPIRATION_62 ON CMOBJPROPS62(EXPIRATION) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS62 ON CMOBJPROPS62 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS63 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS63 primary key (CMID) 
)IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS63 ON CMOBJPROPS63 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB067
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML067
   STORES CMOBJPROPS63
   COLUMN SPEC;
   
CREATE  UNIQUE  INDEX CMIDX067 ON CMATB067 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS64 (
	CMID			integer not null,
	CONTENTTYPE		varchar (256),
	DATASIZE		bigint,
	DATACOMP		decimal(1, 0) default 0 not null,
	DATAPROP		blob(1G), 
	constraint PK_CMOBJPROPS64B primary key (CMID)
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS64B ON CMOBJPROPS64 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB110
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML110
   STORES CMOBJPROPS64
   COLUMN DATAPROP;
 
CREATE  UNIQUE  INDEX CMIDX110 ON CMATB110 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS65 (
	CMID			integer not null,
	BURSTID			varchar (3869),
	BURSTIDINDEX	character (44),
	constraint PK_CMOBJPROPS65 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS65 ON CMOBJPROPS65 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_BURSTIDINDEX on CMOBJPROPS65(BURSTIDINDEX) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS66 (
	CMID			integer not null,
	DEFPORTACT		smallint,
	SPEC			clob(1G),
	POWERPLAY8CONFIGURATION clob(1M),
	constraint PK_CMOBJPROPS66 primary key (CMID) 
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS66 ON CMOBJPROPS66 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB069
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML069
   STORES CMOBJPROPS66
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX069 ON CMATB069 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE AUXILIARY TABLE CMATB070
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML070
   STORES CMOBJPROPS66
   COLUMN POWERPLAY8CONFIGURATION;

CREATE  UNIQUE  INDEX CMIDX070 ON CMATB070 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS67 (
	CMID				integer not null,
	NONPEAKDEMANDBGNH	integer,
	PEAKDEMANDBEGINH	integer,
	ASPEAKCONS			integer,
	BRSPEAKAFFINECONS	integer,
	BRSPEAKMAXPROCS		integer,
	BRSPEAKNONAFFCONS	integer,
	CMSPEAKCONS			integer,
	DDSPEAKCONS			integer,
	DISPEAKCONS			integer,
	DMSPEAKCONS			integer,
	DSPEAKCONS			integer,
	IDSPEAKCONS			integer,
	ISSPEAKCONS			integer,
	IUSPEAKCONS			integer,
	JSPEAKCONS			integer,
	MBSPEAKCONS			integer,			
	MISPEAKCONS			integer,
	MMSPEAKCONS			integer,
	PACSPEAKCONS		integer,
	PDSPEAKCONS			integer,
	PDSPEAKMAXPROCS		integer,
	PPSPEAKAFFINECONS	integer,
	PPSPEAKNONAFFCONS	integer,
	PRSPEAKCONS			integer,
	PTSPEAKCONS			integer,
	RSPEAKAFFINECONS	integer,
	RSPEAKMAXPROCS		integer,
	RSPEAKNONAFFCONS	integer,
   	DIMSNONAFFINECONNCTS    integer,
   	DIMSPEAKCONS         integer,
   	DIMSPEAKMAXPROCS    integer,
   	DIMSPEAKNONAFFINECONNCTS    integer,
	TEMPOBJLOCATION		smallint,
	TEMPOBJLIFETIME		varchar (50),
	AASNONAFFINECONNCTS     integer,  
   	AASPEAKCONS             integer,
   	AASPEAKMAXPROCS         integer,  
   	AASPEAKNONAFFINECONNCTS     integer,
	STSAFFCONS		integer,
	STSEXECLMT		integer,
	STSCMAXPROCS		integer,
	STSNONAFFCONS		integer,
	STSPEAKAFFCONS		integer,
	STSPEAKMAXPROCS		integer,
	STSPEAKNONAFFCONS	integer,	
	OVERRIDEOPTS		clob(1M),
	SERVRDEFOPTS		clob(1M),
	STSQUEUELIM			integer,
	COLLABDISCURI		clob(4000), 
	BRSMAXATTACHSIZE	integer,
	DSMAXATTACHSIZE		integer,
	RSMAXATTACHSIZE		integer,
	ASMAXATTACHSIZE		integer,
	PPSMAXATTACHSIZE	integer,
	QSIDLECONTIMEOUT 	integer,
	QSDUMPMODEL 		decimal(1, 0),
	QSDISPLAN 		decimal(1, 0),
	ACTIVEJMXPROXYURI	clob(4000),
	QSADDJVMARG		varchar (2048),
	QSINITJVMHEAP		integer,
	QSMANCUBESTRT		decimal(1, 0),
	QSMAXJVMHEAP		integer,
	QSROLAPCUBECONF		blob(1M),
	QSROLAPCADMINCT		integer,
	QSRSETQUERYTHRES		integer,
	COOKIECAMPASSHTTP		decimal(1, 0),
	constraint PK_CMOBJPROPS67 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS67 ON CMOBJPROPS67 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB102
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML102
   STORES CMOBJPROPS67
   COLUMN OVERRIDEOPTS;
   
CREATE  UNIQUE  INDEX CMIDX102 ON CMATB102 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB103
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML103
   STORES CMOBJPROPS67
   COLUMN SERVRDEFOPTS;
   
CREATE  UNIQUE  INDEX CMIDX103 ON CMATB103 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB105
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML105
   STORES CMOBJPROPS67
   COLUMN COLLABDISCURI;
   
CREATE  UNIQUE  INDEX CMIDX105 ON CMATB105 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB107
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML107
   STORES CMOBJPROPS67
   COLUMN ACTIVEJMXPROXYURI;
   
CREATE  UNIQUE  INDEX CMIDX107 ON CMATB107 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE table CMOBJPROPS68 (
	CMID			integer not null,
	SPEC			clob(1G),
	constraint PK_CMOBJPROPS68 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS68 ON CMOBJPROPS68 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB071
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML071
   STORES CMOBJPROPS68
   COLUMN SPEC;
 
CREATE  UNIQUE  INDEX CMIDX071 ON CMATB071 USING STOGROUP CMSCRIPT_STOGROUP;
 
CREATE AUXILIARY TABLE CMATB108
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML108
   STORES CMOBJPROPS67
   COLUMN QSROLAPCUBECONF;

CREATE  UNIQUE  INDEX CMIDX108 ON CMATB108  USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS69 (
	CMID			integer not null,
	ORD			integer not null,
	PARMNAME		varchar(512) not null,
	CPARMVALUE		blob(1G),
	constraint PK_CMOBJPROPS69 primary key (CMID, ORD)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS69 ON CMOBJPROPS69 (CMID ASC ,ORD ASC )  USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB072
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML072
   STORES CMOBJPROPS69
   COLUMN CPARMVALUE;

CREATE  UNIQUE  INDEX CMIDX072 ON CMATB072  USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS7 (
	CMID			integer not null,
	EXECERROR		clob(1G),
	CONFIGURATION	clob(1G),
	PORTALPREFS		clob(1G),
	CCREDENTIALS	clob(1G),
	CMODEL			blob(1G),
	SRC				clob(1G),
	SPEC			clob(1G),
	STATE			clob(1G),
	GOVERNORS		clob(1G),
	NAMESPFORMAT	clob (4000),
	constraint PK_CMOBJPROPS7 primary key (CMID) 
)	IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS7 ON CMOBJPROPS7 (CMID ASC ) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB073
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML073
   STORES CMOBJPROPS7
   COLUMN STATE;

CREATE  UNIQUE  INDEX CMIDX073 ON CMATB073 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB074
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML074
   STORES CMOBJPROPS7
   COLUMN GOVERNORS;

CREATE  UNIQUE  INDEX CMIDX074 ON CMATB074 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB075
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML075
   STORES CMOBJPROPS7
   COLUMN NAMESPFORMAT;

CREATE  UNIQUE  INDEX CMIDX075 ON CMATB075 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB076
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML076
   STORES CMOBJPROPS7
   COLUMN EXECERROR;

CREATE  UNIQUE  INDEX CMIDX076 ON CMATB076 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB077
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML077
   STORES CMOBJPROPS7
   COLUMN CONFIGURATION;

CREATE  UNIQUE  INDEX CMIDX077 ON CMATB077 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB078
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML078
   STORES CMOBJPROPS7
   COLUMN PORTALPREFS;

CREATE  UNIQUE  INDEX CMIDX078 ON CMATB078 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB079
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML079
   STORES CMOBJPROPS7
   COLUMN CCREDENTIALS;

CREATE  UNIQUE  INDEX CMIDX079 ON CMATB079 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB080
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML080
   STORES CMOBJPROPS7
   COLUMN CMODEL;

CREATE  UNIQUE  INDEX CMIDX080 ON CMATB080 USING STOGROUP CMSCRIPT_STOGROUP;
   
CREATE AUXILIARY TABLE CMATB081
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML081
   STORES CMOBJPROPS7
   COLUMN SRC;

CREATE  UNIQUE  INDEX CMIDX081 ON CMATB081 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB082
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML082
   STORES CMOBJPROPS7
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX082 ON CMATB082 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS70 (
	CMID            integer not null,
	CONTEXT         clob(64K),
	DEPLOYREFS	clob(1M),
	constraint PK_CMOBJPROPS70 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS70 ON CMOBJPROPS70 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB083
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML083
   STORES CMOBJPROPS70
   COLUMN CONTEXT;

CREATE  UNIQUE  INDEX CMIDX083 ON CMATB083 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB084
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML084
   STORES CMOBJPROPS70
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX084 ON CMATB084 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS71 (
	CMID            integer not null,
	CONTEXT         clob(64K),
	DEPLOYREFS	clob(1M),
	constraint PK_CMOBJPROPS71 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS71 ON CMOBJPROPS71 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB085
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML085
   STORES CMOBJPROPS71
   COLUMN CONTEXT;

CREATE  UNIQUE  INDEX CMIDX085 ON CMATB085 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB086
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML086
   STORES CMOBJPROPS71
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX086 ON CMATB086 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS72 (
	CMID            integer not null,
	CONTEXT         clob(64K),
	constraint PK_CMOBJPROPS72 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS72 ON CMOBJPROPS72 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB087
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML087
   STORES CMOBJPROPS72
   COLUMN CONTEXT;

CREATE  UNIQUE  INDEX CMIDX087 ON CMATB087 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS73 (
	CMID         integer not null,
	ALIASROOT    varchar (512),
	URI          clob (4000),
	UNIXURI      clob (4000),
	WINDOWSURI   clob (4000),
	CONSTRAINT PK_CMOBJPROPS73 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS73 ON CMOBJPROPS73 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB088
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML088
   STORES CMOBJPROPS73
   COLUMN URI;

CREATE  UNIQUE  INDEX CMIDX088 ON CMATB088 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB089
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML089
   STORES CMOBJPROPS73
   COLUMN UNIXURI;

CREATE  UNIQUE  INDEX CMIDX089 ON CMATB089 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB090
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML090
   STORES CMOBJPROPS73
   COLUMN WINDOWSURI;

CREATE  UNIQUE  INDEX CMIDX090 ON CMATB090 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS74 (
	CMID         	integer not null,
	DEPLOYREFS	clob(1M),
	LAUNCHTYPE	varchar (512),
	SPEC		blob(1G),
	CONSTRAINT PK_CMOBJPROPS74 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS74 ON CMOBJPROPS74 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_CMLAUNCHTYPE on CMOBJPROPS74(LAUNCHTYPE) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB096
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML096
   STORES CMOBJPROPS74
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX096 ON CMATB096 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB097
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML097
   STORES CMOBJPROPS74
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX097 ON CMATB097 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS75 (
	CMID         	integer not null,
	RESOURCETYPE	varchar (512),
	SPEC		blob(1G),
	CONSTRAINT PK_CMOBJPROPS75 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS75 ON CMOBJPROPS75 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create index IDX_RESOURCETYPE on CMOBJPROPS75(RESOURCETYPE) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB098
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML098
   STORES CMOBJPROPS75
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX098 ON CMATB098 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS76 (
	CMID         	integer not null,
	CONTENTTYPE	varchar (512),
	CONSTRAINT PK_CMOBJPROPS76 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS76 ON CMOBJPROPS76 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS77 (
	CMID			 integer not null ,
	DSCONNECTIONNAME varchar (512),
	DSNAME			 varchar (512),
	CONSTRAINT PK_CMOBJPROPS77 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS77 ON CMOBJPROPS77 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMOBJPROPS78 (
	CMID			integer not null,
	BINDINGNAME		varchar (512),
	INPUTMESSNAME		varchar (512),
	OPERATIONNAME		varchar (512),
	OUTPUTMESSNAME		varchar (512),
	SERVICENAME		varchar (512),
	BULKEVENTS		decimal(1, 0),
	URI			clob (4000),
	constraint PK_CMOBJPROPS78 primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS78 ON CMOBJPROPS78 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB099
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML099
   STORES CMOBJPROPS78
   COLUMN URI;

CREATE  UNIQUE  INDEX CMIDX099 ON CMATB099 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS79 (
	CMID         	integer not null,
	PUBLISHED	decimal(1, 0),
	SPEC		clob(1M),
	CONSTRAINT PK_CMOBJPROPS79 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS79 ON CMOBJPROPS79 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB100
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML100
   STORES CMOBJPROPS79
   COLUMN SPEC;

CREATE  UNIQUE  INDEX CMIDX100 ON CMATB100 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS80 (
	CMID             integer not null,
	REPOSITORYRULES  clob(1G),
	NSCAPS           clob(4000),
	CONSTRAINT PK_CMOBJPROPS80 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS80 ON CMOBJPROPS80 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB104
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML104
   STORES CMOBJPROPS80
   COLUMN REPOSITORYRULES;

CREATE  UNIQUE  INDEX CMIDX104 ON CMATB104 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB141
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML141
   STORES CMOBJPROPS80
   COLUMN NSCAPS;

CREATE  UNIQUE  INDEX CMIDX141 ON CMATB141 USING STOGROUP CMSCRIPT_STOGROUP;
   

create table CMOBJPROPS81 (
	CMID			integer not null,
	AGGREGATES		clob(1M),
	CONSTRAINT PK_CMOBJPROPS81 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS81 ON CMOBJPROPS81 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB111
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML111
   STORES CMOBJPROPS81
   COLUMN AGGREGATES;

CREATE  UNIQUE  INDEX CMIDX111 ON CMATB111 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS82 (
	CMID			integer not null,
	BPMRESTURI		clob (4000),
	CONSTRAINT PK_CMOBJPROPS82 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS82 ON CMOBJPROPS82 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB112
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML112
   STORES CMOBJPROPS82
   COLUMN BPMRESTURI;

CREATE  UNIQUE  INDEX CMIDX112 ON CMATB112 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS83 (
	CMID			integer not null,
	MOBILECONFIG		blob(4000),
	CONSTRAINT PK_CMOBJPROPS83 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS83 ON CMOBJPROPS83 (CMID ASC) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB114
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML114
   STORES CMOBJPROPS83
   COLUMN MOBILECONFIG;

CREATE  UNIQUE  INDEX CMIDX114 ON CMATB114 USING STOGROUP CMSCRIPT_STOGROUP;
   
create table CMOBJPROPS84 (
	CMID		integer not null,
	SPEC		clob(1M),
	DATASIZE	bigint,
	DATAMODTIME	timestamp,
	CONSTRAINT PK_CMOBJPROPS84 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS84 ON CMOBJPROPS84 (CMID ASC) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB115
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML115
   STORES CMOBJPROPS84
   COLUMN SPEC;
 
CREATE  UNIQUE  INDEX CMIDX115 ON CMATB115 USING STOGROUP CMSCRIPT_STOGROUP;


create table CMOBJPROPS85 (
    CMID             integer not null,
    DATA             clob(50M),
    DEPLOYREFS       clob(1M),
    OBJREFS          clob(1M),
    BIVARS           clob(50M),
    EMBEDDING        clob(50M),
    STATUS           clob(50M),
    USAGETRACKMODEL  clob(1M),
    CONSTRAINT PK_CMOBJPROPS85 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS85 ON CMOBJPROPS85 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB117
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML117
   STORES CMOBJPROPS85
   COLUMN DATA;

CREATE  UNIQUE  INDEX CMIDX117 ON CMATB117 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB125
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML125
   STORES CMOBJPROPS85
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX125 ON CMATB125 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB132
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML132
   STORES CMOBJPROPS85
   COLUMN OBJREFS;

CREATE UNIQUE INDEX CMIDX132 ON CMATB132 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB142
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML142
   STORES CMOBJPROPS85
   COLUMN BIVARS;

CREATE UNIQUE INDEX CMIDX142 ON CMATB142 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB143
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML143
   STORES CMOBJPROPS85
   COLUMN EMBEDDING;

CREATE UNIQUE INDEX CMIDX143 ON CMATB143 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB144
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML144
   STORES CMOBJPROPS85
   COLUMN STATUS;

CREATE UNIQUE INDEX CMIDX144 ON CMATB144 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB145
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML145
   STORES CMOBJPROPS85
   COLUMN USAGETRACKMODEL;

CREATE UNIQUE INDEX CMIDX145 ON CMATB145 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS86 (
	CMID			integer not null,
	KSCHEMA			varchar (512),
	KCATALOG		varchar (512),
	CPHYSDEF		clob(10M),
	CPHYSANAL		clob(10M),
	CBASEDEF		clob(10M),
	CBASEOVER		clob(10M),
	CBASEANAL		clob(10M),
	STATUSID		smallint,
	SNAPSHOT       	clob(1M),
	HISTORY       	clob(10M),
	SNAPSHOTENBL	decimal(1, 0),
	DEPLOYREFS		clob(1M),
	ALIASROOT		varchar (512),
	CONSTRAINT PK_CMOBJPROPS86 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS86 ON CMOBJPROPS86 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB118
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML118
   STORES CMOBJPROPS86
   COLUMN CPHYSDEF;

CREATE  UNIQUE  INDEX CMIDX118 ON CMATB118 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB119
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML119
   STORES CMOBJPROPS86
   COLUMN CPHYSANAL;

CREATE  UNIQUE  INDEX CMIDX119 ON CMATB119 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB120
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML120
   STORES CMOBJPROPS86
   COLUMN CBASEDEF;

CREATE  UNIQUE  INDEX CMIDX120 ON CMATB120 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB121
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML121
   STORES CMOBJPROPS86
   COLUMN CBASEANAL;

CREATE  UNIQUE  INDEX CMIDX121 ON CMATB121 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB122
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML122
   STORES CMOBJPROPS86
   COLUMN SNAPSHOT;

CREATE  UNIQUE  INDEX CMIDX122 ON CMATB122 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB123
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML123
   STORES CMOBJPROPS86
   COLUMN HISTORY;

CREATE  UNIQUE  INDEX CMIDX123 ON CMATB123 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB124
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML124
   STORES CMOBJPROPS86
   COLUMN DEPLOYREFS;

CREATE  UNIQUE  INDEX CMIDX124 ON CMATB124 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB133
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML133
   STORES CMOBJPROPS86
   COLUMN CBASEOVER;

CREATE  UNIQUE  INDEX CMIDX133 ON CMATB133 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS87 (
	CMID        integer not null,
	EXT        clob(100M),
	CONSTRAINT PK_CMOBJPROPS87 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS87 ON CMOBJPROPS87 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB126
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML126
   STORES CMOBJPROPS87
   COLUMN EXT;

CREATE UNIQUE INDEX CMIDX126 ON CMATB126 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS88 (
	CMID        integer not null,
	SCHEMATYPE		varchar (256),
	STATUS			varchar (256),
	STATUSINFO		clob(10M),
	CONSTRAINT PK_CMOBJPROPS88 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS88 ON CMOBJPROPS88 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB130
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML130
   STORES CMOBJPROPS88
   COLUMN STATUSINFO;

CREATE UNIQUE INDEX CMIDX130 ON CMATB130 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS89 (
	CMID        integer not null,
	DOCTYPE     varchar(64) not null,
	DOCID       varchar(64) not null,
	CONTENT     clob(10M),
	CONSTRAINT PK_CMOBJPROPS89 PRIMARY KEY (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS89 ON CMOBJPROPS89 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE INDEX IDX_CMPROPS89_1 on CMOBJPROPS89(DOCID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB131
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML131
   STORES CMOBJPROPS89
   COLUMN CONTENT;

CREATE UNIQUE INDEX CMIDX131 ON CMATB131 USING STOGROUP CMSCRIPT_STOGROUP;

create table CMOBJPROPS9 (
	CMID			integer not null,
	ASOFTIME		timestamp, 
	CANBURST		decimal(1, 0),
	constraint PK_CMOBJPROPS9 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS9 ON CMOBJPROPS9 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS90 (
	CMID        integer not null,
	SPEC        clob(1M),
	CONSTRAINT PK_CMOBJPROPS90 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS90 ON CMOBJPROPS90 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB135
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML135
   STORES CMOBJPROPS90
   COLUMN SPEC;

CREATE UNIQUE INDEX CMIDX135 ON CMATB135 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS91 (
	CMID        integer not null,
	SKDATA      clob(1M),
	CONSTRAINT PK_CMOBJPROPS91 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMOBJPROPS91 ON CMOBJPROPS91 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB136
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML136
   STORES CMOBJPROPS91
   COLUMN SKDATA;

CREATE UNIQUE INDEX CMIDX136 ON CMATB136 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS92 (
	CMID        integer NOT NULL,
	CONTYPE     varchar(64),
	URI         clob(4000),
	SPEC        clob(64k),
	CONSTRAINT PK_CMOBJPROPS92 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS92 ON CMOBJPROPS92 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB137
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML137
   STORES CMOBJPROPS92
   COLUMN URI;

CREATE UNIQUE INDEX CMIDX137 ON CMATB137 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB138
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML138
   STORES CMOBJPROPS92
   COLUMN SPEC;

CREATE UNIQUE INDEX CMIDX138 ON CMATB138 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMOBJPROPS93 (
	CMID                 integer NOT NULL,
	PROGRESS             varchar(1024),
	JOBID                varchar(64),
	STATE                varchar(64),
	CONFIGURATION        clob(2M),
	CONSTRAINT PK_CMOBJPROPS93 PRIMARY KEY (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMOBJPROPS93 ON CMOBJPROPS93 (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB140
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML140
   STORES CMOBJPROPS93
   COLUMN CONFIGURATION;
   
CREATE UNIQUE INDEX CMIDX140 ON CMATB140 USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMTAGS (
	CMID      integer not null,
	ORD       integer not null,
	TAG       varchar(256),
	constraint PK_CMTAGS primary key (CMID, ORD)
) IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMTAGS ON CMTAGS (CMID, ORD) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE INDEX IDX_CMTAGS on CMTAGS(CMID, TAG) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMPOLICIES (
	CMID			integer not null,
	POLICIES		blob(1M), 
	constraint PK_CMPOLICIES primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMPOLICIES ON CMPOLICIES (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB091
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML091
   STORES CMPOLICIES
   COLUMN POLICIES;

CREATE  UNIQUE  INDEX CMIDX091 ON CMATB091 USING STOGROUP CMSCRIPT_STOGROUP;
  
create table CMVIEWED (
	CMID			integer not null,
	OBJID			clob (4000),
	VIEWED			decimal(1, 0) default 0 , 
	constraint PK_CMVIEWED primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMVIEWED ON CMVIEWED (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB092
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML092
   STORES CMVIEWED
   COLUMN OBJID;

CREATE  UNIQUE  INDEX CMIDX092 ON CMATB092  USING STOGROUP CMSCRIPT_STOGROUP;
 
create table CMPROPERTIES (
	PROPID			smallint not null,
	NAME			varchar(50) not null,
	DEF				blob(10K),
	constraint PK_CMPROPERTIES primary key(PROPID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMPROPERTIES ON CMPROPERTIES (PROPID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB093
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML093
   STORES CMPROPERTIES
   COLUMN DEF;
   
CREATE  UNIQUE  INDEX CMIDX093 ON CMATB093  USING STOGROUP CMSCRIPT_STOGROUP;
 
create table CMCLASSES (
	CLASSID			integer not null,
	NAME			varchar(50) not null,
	USAGE			smallint,
	DEF				blob(100K),
	constraint PK_CMCLASSES primary key(CLASSID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMCLASSES ON CMCLASSES (CLASSID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB094
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML094
   STORES CMCLASSES
   COLUMN DEF;

CREATE  UNIQUE  INDEX CMIDX094 ON CMATB094 USING STOGROUP CMSCRIPT_STOGROUP;
  
create table CMLOCALES (
	LOCALEID		smallint		not null,
	MAPDLOCALEID	smallint		not null,
	LOCALE			varchar(20)		not null,
	constraint PK_CMLOCALES primary key (LOCALEID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMLOCALES ON CMLOCALES (LOCALEID) USING STOGROUP CMSCRIPT_STOGROUP;

create table CMGUIDS (
	CMID			integer not null ,
	GUID			varchar(50),
	constraint PK_CMGUIDS primary key (CMID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMGUIDS ON CMGUIDS (CMID) USING STOGROUP CMSCRIPT_STOGROUP;

create trigger CMGUIDS_TR
no cascade before insert on CMGUIDS
referencing new as NG
for each row mode db2sql
set NG.GUID = VARCHAR( TIMESTAMP( GENERATE_UNIQUE() ) );

CREATE TABLE CMREFNOORD1 (
	PROPID		smallint not null,
	CMID		integer not null ,
	REFCMID		integer not null ,
	constraint PK_CMREFNOORD1 primary key (CMID, PROPID) 
) IN CMSCRIPT_CREATE_IN;

create unique index PK_CMREFNOORD1 on CMREFNOORD1(CMID, PROPID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMREFNOORD2 (
	CMID		integer not null ,
	REFCMID		integer not null ,
	constraint PK_CMREFNOORD2 primary key (CMID) 
) IN CMSCRIPT_CREATE_IN;

create unique index PK_CMREFNOORD2 on CMREFNOORD2(CMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMREFORD1 (
	PROPID		smallint not null,
	CMID		integer not null ,
	ORD		integer not null,
	REFCMID		integer not null ,
	constraint PK_CMREFORD1 primary key (CMID, PROPID, ORD) 
) IN CMSCRIPT_CREATE_IN;

create unique index PK_CMREFORD1 on CMREFORD1(CMID, PROPID, ORD) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMREFORD2 (
	CMID		integer not null ,
	ORD		integer not null,
	REFCMID		integer not null ,
	constraint PK_CMREFORD2 primary key (CMID, ORD) 
) IN CMSCRIPT_CREATE_IN;

create unique index PK_CMREFORD2 on CMREFORD2(CMID, ORD) USING STOGROUP CMSCRIPT_STOGROUP;

create view CMOWNERCOUNT(OBJID, OWN_NUMBER) as 
   SELECT p2.OBJID, count(o.CMID)  
   FROM CMOBJECTS o left outer join CMREFNOORD2 p1 on p1.CMID = o.CMID
                    left outer join CMOBJPROPS1 p2 on p1.REFCMID = p2.CMID
   GROUP BY p2.OBJID;

CREATE table CMDATAUPGRADE (
	PLUGINNAME 	varchar (255) not null ,
	CI_PLUGINNAME	varchar (255) not null ,
	VERSION		varchar (64) ,
	CONSTRAINT PK_CMDATAUPGRADE PRIMARY KEY (CI_PLUGINNAME)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMDATAUPGRADE ON CMDATAUPGRADE (CI_PLUGINNAME) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE table CMSIZEINFO (
	STOREID			varchar (255) not null,
	CLASSID			integer not null,
	TOTALFORCLASSID		integer not null,
	TOTALCOUNT		integer ,
        TOTALSIZE		integer ,
	CONSTRAINT PK_CMSIZEINFO PRIMARY KEY (STOREID, TOTALFORCLASSID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMSIZEINFO ON CMSIZEINFO (STOREID, TOTALFORCLASSID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMSPLIT  (
		CMID		int not null,
		TRANSACTIONID	varchar(255) not null,
		constraint PK_CMSPLIT  primary key (CMID, TRANSACTIONID)
) IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMSPLIT ON CMSPLIT (CMID, TRANSACTIONID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMARCHIVEQUEUE (
	OBJID 	 	VARCHAR(512) DEFAULT NULL,
	ITEMID	 	VARCHAR(255) NOT NULL,
	QUEUEID		VARCHAR(255) NOT NULL,
	WORKFLOW 	VARCHAR(255) NOT NULL,
	CONSUMERNAME	VARCHAR(255) DEFAULT NULL,
	STATE		INT,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	CONSTRAINT PK_CMARCHIVEQUEUE PRIMARY KEY (ITEMID)
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMARCHIVEQUEUE ON CMARCHIVEQUEUE (ITEMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMDELETEQUEUE (
	OBJID 	 	VARCHAR(512) DEFAULT NULL,
	ITEMID	 	VARCHAR(255) NOT NULL,
	QUEUEID		VARCHAR(255) NOT NULL,
	WORKFLOW 	VARCHAR(255) NOT NULL,
	CONSUMERNAME	VARCHAR(255) DEFAULT NULL,
	STATE		INT,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	CONSTRAINT PK_CMDELETEQUEUE PRIMARY KEY (ITEMID)
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMDELETEQUEUE ON CMDELETEQUEUE (ITEMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMINDEXQUEUE (
	OBJID 	 		VARCHAR(1024) DEFAULT NULL,
	ITEMID	 		VARCHAR(50) NOT NULL,
	QUEUEID			VARCHAR(50) NOT NULL,
	WORKFLOW 		VARCHAR(50) NOT NULL,
	CONSUMERNAME	VARCHAR(50) DEFAULT NULL,
	STATE			INT,
	INSERTIONTIME 	TIMESTAMP NOT NULL,
	INDEXACTION		VARCHAR(50) NOT NULL,
	INDEXCLASS		VARCHAR(255) NOT NULL,
	INDEXPROPS		CLOB(10M),
	CONSTRAINT PK_CMINDEXQUEUE PRIMARY KEY (ITEMID)
)IN CMSCRIPT_CREATE_IN;

CREATE INDEX IDX_CMINDEXQUEUE ON CMINDEXQUEUE(STATE, QUEUEID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE  UNIQUE  INDEX PK_CMINDEXQUEUE ON CMINDEXQUEUE (ITEMID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE AUXILIARY TABLE CMATB116
   IN CMSCRIPT_DATABASE.CMSCRIPT_CS_IDCML116
   STORES CMINDEXQUEUE
   COLUMN INDEXPROPS;
   
CREATE  UNIQUE  INDEX CMIDX116 ON CMATB116 USING STOGROUP CMSCRIPT_STOGROUP; 

CREATE TABLE CMQUEUELOCK (
	QUEUEID		VARCHAR(255) NOT NULL,
	CONSTRAINT PK_CMQUEUELOCK PRIMARY KEY (QUEUEID)
)IN CMSCRIPT_CREATE_IN;

CREATE  UNIQUE  INDEX PK_CMQUEUELOCK ON CMQUEUELOCK (QUEUEID) USING STOGROUP CMSCRIPT_STOGROUP;

CREATE TABLE CMTENANTID (
	TENANTID	INTEGER not null,
	TENANTNAME	VARCHAR(255) not null,
	CONSTRAINT PK_CMTENANTID PRIMARY KEY (TENANTID)
)IN CMSCRIPT_CREATE_IN;

CREATE UNIQUE INDEX PK_CMTENANTID ON CMTENANTID (TENANTID) USING STOGROUP CMSCRIPT_STOGROUP;

INSERT INTO CMTENANTID (TENANTID,TENANTNAME) VALUES (0, '');

insert into CMSYSPROPS (PROPNAME, CI_PROPNAME, PROPVALUE) 
	values ('CMStoreVersion', upper('CMStoreVersion'), '7.7003');
