I have quick question. Is it possible to add new database when HSQL Server is running?
Quick view:
- when HSQL Server is starting (by runServer.bat file) server.properties with databases configuration is loading,
- during Server runtime I'd like to add new database (from e.g. Java application) without restart database server etc.
- I try to add many properties to the Server (e.g remote_open) but I always get: "[Thread[HSQLDB Connection @52859374,5,HSQLDB Connections @754ba872]]: database alias= does not exist" because it try to connect to expected database instead of creating it...
Is it possible?
There is easy for many database systems but for HSQL I cannot find anything...
You need to start the server in a special
remote_openmode which allows new databases to be opened. In addition, you need to specify the file path of the new database when you connect. When the server is started, check the messages forremote-open. Then connect with a URL like thisjdbc:hsqldb:hsql://localhost/testx;file:mytextxfileIn the URLtestxis the network id of the database andfile:mytextxfileis the file path of the database files.Server messages when it starts:
Server messages when connecting to new database: