#!/bin/ksh
# set FIPER_HOME
FIPER_HOME=

DERBY_INSTALL_DIR=

DERBY_HOME=$FIPER_HOME/reffiles/SMAFIPderby

SQL_LOCATION=$FIPER_HOME/../config/Derby

export JAVA_HOME=$FIPER_HOME/code/jre8

echo cp $SQL_LOCATION/derby.properties  $DERBY_INSTALL_DIR

cp -f $SQL_LOCATION/derby.properties  $DERBY_INSTALL_DIR

. $DERBY_HOME/bin/ij $SQL_LOCATION/schema.sql


# shutdown derby database
. $JAVA_HOME/bin/java -Dderby.system.home=$DERBY_INSTALL_DIR -jar $FIPER_HOME/reffiles/SMAFIPderby/lib/derbyrun.jar server shutdown -p 1527 -h localhost
