Strictly Programming

Mini FAQ for HSQLDB

Posted in HSQLDB by sqllyw on 12/05/2008


Some notes on the use of hsqldb


To start hsqldb:
go to a directory, then:
java -cp $HSQLDB_HOME/lib/hsqldb.jar org.hsqldb.Server -database.0 file:mydb -dbname.0 xdb

To generate tables:
java -jar $HSQLDB_HOME/lib//hsqldb.jar localhost-sa sql.sql
note: assumes the struct is in sql.sql and we are using localhost-sa in the sqltool.rc

To start the GUI database manager:
java -cp $HSQLDB_HOME/lib/hsqldb.jar org.hsqldb.util.DatabaseManager

To shutdown the database:
java -jar $HSQLDB_HOME/lib//hsqldb.jar –sql “shutdown” –rcfile sqltool.rc localhost-sa
Note: make sure u run above in the same directory as sqltool.rc

How to access the hsqldb running in a remote server?
you can use ssh tunneling:
ssh -L 9001:localhost:9001 myid@mydomain.com
then you can start the database manager to access it as it is running locally.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: