blob: a0e1ba94d17cb7c25b8e6675f0a8fd58f6571bd9 [file] [log] [blame]
david_williams556a5812008-09-08 15:48:46 +00001#!/bin/sh
2
3#
4# This script makes it easier to launch various Derby tools
5# Usage: "sh derby.sh <command>"
6# where <command> is one of "start, stop, ij, look"
7#
8
9# where the Derby libraries reside
10CSLIB=/Volumes/Stuff/Java/IBM/Cloudscape_10.0/lib
11
12# where the DBs live
13DBROOT=/tmp/derby
14
15# name of the default DB
16DBNAME=perfDB
17
18# the Java VM
19JAVA=/usr/bin/java
20
21#MacOS: NSC="-Dderby.system.home=$DBROOT -Dderby.storage.fileSyncTransactionLog=true org.apache.derby.drda.NetworkServerControl"
22NSC="-Dderby.system.home=$DBROOT org.apache.derby.drda.NetworkServerControl"
23
24export CLASSPATH="${CSLIB}/derby.jar:${CSLIB}/derbytools.jar:${CSLIB}/derbynet.jar:${CLASSPATH}"
25
26case $1 in
27 start )
28 $JAVA -Xms256M -Xmx256M $NSC start -h 0.0.0.0
29 break;;
30
31 stop )
32 $JAVA $NSC shutdown
33 break;;
34
35 ij )
36 $JAVA -Dij.protocol=jdbc:derby: -Dij.database=$DBROOT/$DBNAME com.ihost.cs.tools.ij
37 break;;
38
39 look )
40 $JAVA com.ihost.cs.tools.cslook -d jdbc:derby:$DBROOT/$DBNAME
41 break;;
42
43 * )
44 echo "unknown command $1"
45 break ;;
46esac