#!/bin/sh


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

DB=$1
DB_DIR1=$2
DB_DIR2=$3

db2 -v db2start

# Create the DB
createdb.sh ${DB} ${DB_DIR1} ${DB_DIR2}

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

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

