HSQL Database Hints


HSQL (project management site) is an open source relational database system. It is very fast and fully Java based which has the advantage that it should (theoretically) run on all platforms where Java is available. For details see HSQL. In Araya we support HSQL in our translation management system Araya through JDBC as one of several database systems. In order to run this comfortable we had to support running HSQL as a Windows service. The following describes how this can be achieved by using a renamed tomcat.exe (this is very similar how to run XINDICE 1.0 as a service.)

How-To run HSQL as a service

In a first step you need to rename tomcat.exe to hsql.exe. This is recommended in order to display the service as HSQL in the Service display and in the Windows task manager.

HSQL Service Display
HSQL Service Display

HSQL Task Manager
HSQL Display in Windows Task Manager

Next a batch file is needed to run the service. The following batch file installs the HSQL service. You need to adapt the path names in there to the directoriey where your files are located. EAGLE_MEMEX_BIN references the jar file directory, DATABASE the database instance to use, CURRENTDIR will be used to write error and log file. Please note hat you can only run one instance of HSQL per port.

net stop HSQLService
hsql.exe -uninstall HSQLService
set EAGLE_MEMEX_BIN=c:/projects/hsqldb/lib
set DATABASE=c:/projects/hsqldb/data/araya
set CURRENTDIR=c:/projects/hsqldb/data
hsql.exe -install HSQLService "%JAVA_HOME%\jre\bin\server\jvm.dll" -jvm_option -Xms16m -Xmx128m -Djava.class.path=".;%EAGLE_MEMEX_BIN%\hsqldb.jar" -jvm_option -Dsystem.drive="c:" -start org.hsqldb.Server -params -database %DATABASE% -current "%CURRENTDIR%" -out "%CURRENTDIR%/service.out" -err "%CURRENTDIR%/service.err"
net start HSQLService 
You can download the whole packe from here.
The HSQL service is started using "net start HSQLService" and stopped using "net stop HSQLService", uninstalled using "hsql.exe -uninstall HSQLService".

Annotation

I tested the bach file and the description here with the latest HSQL Version (HSQLDB 1.8.0) and it still works!
Back to main page
e-mail:
Last change: 27.08.2006