# Installation prerequisites:
# ---------------------------
# coded charset = UTF-8
# Bufferpool B1 with pagesize 4 kB (needed for DB2 System Tablespaces)
# Bufferpool B2 with pagesize 16 kB
# regular tablespace T1 using above bufferpool B2

create table J2EE_CONFIG (
	"CID" bigint not null,
	"PARENTCID" bigint,
	"PATHPREFIX" varchar(381),
	"CPATH" varchar(768),
	"PATHHASH" integer,
	"CACHEMODE" integer,
	"CTYPE" integer,
	"LINKEDCPATH" varchar(768),
	primary key (CID)
) in [T1];
create unique index J2EE_CONFIG_I0 on J2EE_CONFIG(CPATH);
create index J2EE_CONFIG_I1 on J2EE_CONFIG(PATHPREFIX);
create index J2EE_CONFIG_I2 on J2EE_CONFIG(PATHHASH);
create index J2EE_CONFIG_I3 on J2EE_CONFIG(PARENTCID);
create index J2EE_CONFIG_I4 on J2EE_CONFIG(CTYPE);
create table J2EE_CONFIGENTRY(
	"CID" bigint not null,
	"NAMEHASH" integer not null,
	"ISFILE" smallint not null,
	"NAME" varchar(768) not null,
	"DTYPE" bigint,
	"VBIGINT" bigint,
	"VDOUBLE" double,
	"VSTR" varchar(6000),
	"VBYTES" varchar(2000) FOR BIT DATA,
	"FBLOB" blob(2G) NOT LOGGED
) in [T1];
create index J2EE_CFGENTRY_I0 on J2EE_CONFIGENTRY(CID, NAMEHASH, ISFILE);
create table J2EE_KEYSEQUENCE (
	"SEQUENCE_ID" integer not null,
	"INC_VALUE" bigint,
	primary key (SEQUENCE_ID)
) in [T1];