rem # set FIPER_HOME
set FIPER_HOME=
set DERBY_INSTALL_DIR=

set DERBY_HOME=%FIPER_HOME%\reffiles\SMAFIPderby
set SQL_LOCATION=%FIPER_HOME%/../config/derby

set JAVA_HOME=%FIPER_HOME%/code/jre8
rem # set location where you want to install

call %DERBY_HOME%\bin\ij.bat "%SQL_LOCATION%\schema.sql"
call xcopy /y "%SQL_LOCATION%\derby.properties"  %DERBY_INSTALL_DIR%

rem 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
