tags:

views:

711

answers:

2

Hi

In the documentation of the HSQLDB is a command line statement to start a HSQLDB server (HSQLDB Doc). But there is this "file:mydb" property, so I assume its not in memory-only mode.

How do I run a memory-only HSQLDB server?

I runned the following but get no clue.

java -cp ../lib/hsqldb.jar org.hsqldb.Server -?
A: 

I believe the file is used to load up the db into memory, and then persist when Server stops. I don't think the file is accessed while you're running.

It's been awhile since I've used HSQLDB (or H2), but I'm pretty sure that's how it works.

Todd R
+1  A: 

use java -cp .\hsqldb-1.8.0.10.jar org.hsqldb.Server -database.0 mem:aname

In memory mode is specified by the connection url - so if you want, you can just have a server.properties file in the same directory, and set the connection url to use the mem protocol - or if you are using hsqldb in another application that allows you to specify the connection url such as jdbc, specify jdbc:hsqldb:mem:aname.

Chii
I omitted the version in .\hsqldb-1.8.0.10.jar, but then it works. Thank you.
Juri Glass