#!/bin/sh

db2set DB2_APM_PERFORMANCE=

DB=specdb
DB_DIR=/specdb/DB2
if [ ! -d $DB_DIR ]
then
	echo you must create the $DB_DIR directory on your RAID first
	exit 2
fi
chmod 775 $DB_DIR

db2 -v db2start

# Create the DB
sh createdb.sh ${DB} ${DB_DIR}

# Create the tablespaces and tables
sh schema_C.sh ${DB} ${DB_DIR}
sh schema_M.sh ${DB} ${DB_DIR}
sh schema_O.sh ${DB} ${DB_DIR}
sh schema_S.sh ${DB} ${DB_DIR}

# Create the (U??) tablespace and table
sh schema_U.sh ${DB} ${DB_DIR}

