#!/bin/sh

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

# added by Zhidong
db2 -v db2stop
db2set DB2_APM_PERFORMANCE=OFF
db2 update dbm cfg using SVCENAME 50000


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}

