OPTION | TYPE | DEFAULT | DESCRIPTION |
-? | -- | -- | prints this message |
-address | name|number | any | server inet address |
-port | number | 9001/544 | port at which server listens |
-database.i | [type]spec | 0=test | name of database i |
-dbname.i | alias | -- | url alias for database i |
-silent | true|false | true | false => display all queries |
-trace | true|false | false | display JDBC trace messages |
-tls | true|false | false | TLS/SSL (secure) sockets |
-no_system_exit | true|false | false | do not issue System.exit() |
The server looks for a 'server.properties' file in the current directory and
loads properties from it if it exists.
Here is an example 'server.properties' file:
server.port=1234
#mounts a file-based (persistent) database with alias 'filetest'
#database connection url would be 'jdbc:hsqldb:hsql://host:1234/filetest'
#but '/filetest' can be omitted because database.0 is the default
server.database.0=file:/mydatbasedir/test
server.dbname.0=filetest
#mounts a 'file_in_jar' database with alias 'restest'
#database connection url would be 'jdbc:hsqldb:hsql://host:1234/restest'
server.database.1=res:/mypackage/test
server.dbname.1=restest
#mounts a 100% in-memory (transient) database with alias 'memtest'
#database connection url would be 'jdbc:hsqldb:hsql://host:1234/memtest'
server.database.2=mem:test
server.dbname.2=memtest
...
server.database.n=...
server.dbname.n=...
server.silent=true
#end of 'server.properties' file
Command line options override those loaded from the 'server.properties' file.
The default port is 9001 if tls is false and 544 if it is true.
When omitted, the value of tls is true iff the system property:
javax.net.ssl.keyStore
is defined. An example command line invocation requesting TLS might look like:
java -Djavax.net.ssl.keyStore=x -Djavax.net.ssl.keyStorePassword=y org.hsqldb.Server [options]
HSQLDB server model startup example:
java -cp ../lib/hsqldb.jar org.hsqldb.Server -database.0 mydb -dbname.0 xdb
HSQLDB manager starup example: java -cp ../lib/hsqldb.jar org.hsqldb.util.DatabaseManager
No comments:
Post a Comment