#!/bin/sh


if [ $# -ne 2 ]
then
   echo "Usage: blddb.sh <database_name> <database dir>"
   exit 1
fi

DB=$1
DB_DIR=$2

db2 -v db2start

# Create the DB
/SPECjAppServer2004/schema/db2/createdb.sh ${DB} ${DB_DIR}

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

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

