#!/bin/sh

DB=specdb
DB_DIR=/specdb/DB2
DB_DIR2=/specdb2/DB2
DB_DIR3=/specdb3/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
db2set DB2_PARALLEL_IO=*
db2set db2comm=tcpip
db2set DB2_APM_PERFORMANCE=
db2stop

db2 -v db2start

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

# 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}

