#!/bin/sh
#load SPECjAppServer2004 schema into Postgres
#POSTGRES_HOME=/opt/pervasivepostgres; export POSTGRES_HOME
#POSTGRES_HOME=/usr; export POSTGRES_HOME
rm -rf /dbstore/data/spects/*
psql -U postgres postgres < sql/create_tablespace.sql
dropdb -U postgres specdb
createdb -U postgres specdb --tablespace jappdata
createuser -s -U postgres -D -R spec
for file in `ls sql/schema_*.sql` sql/db-tuning.sql
do
    psql -U spec specdb < $file
done

