[HyperSQL Server] tworzenie nowej bazy danych podczas działania serwera

0

Cześć wszystkim!
Mam szybkie pytanie. Czy jest możliwe utworzenie nowej bazy danych podczas gdy HSQL Server jest w runtime?

No bo tak:

  • kiedy HSQL Server startuje to ładowany jest plik z konfiguracją baz danych (server.properties)
  • podczas gdy wszystko już jest załadowane, chciałbym dodać nową baze danych (na przykład z jakieś aplikacji Java) ale bez resetowania serwera HSQL itp.

Próbowałem dodawać różne propertiesy do Servera ale zawsze dostaje "[Thread[HSQLDB Connection @52859374,5,HSQLDB Connections @754ba872]]: database alias= does not exist" ponieważ próbuje się połączyć do bazy danych o takim adresie zamiast ją tworzyć...

Czy to jest w ogóle możliwe?

To jest łatwe dla innych systemów bazodanowych ale dla HSQL Server nie znalazłem żadnej odpowiedzi...

Pozdrawiam!

0

google pierwszy link..

Allowing a Connection to Open or Create a Database Link

If the server.remote_open property is** true**, the Server works differently from the normal mode. In this mode, it is not necessary to have any databases listed as server.database.0 etc. in the Server startup properties.

If there are databases listed, they are opened as normal. The server does not shutdown when the last database is closed. In this mode, a connection can be established to a database that is not open or does not exist. The server will open the database or create it, then return a connection to the database.

The connection URL must include the path to the database, separated with a semicolon from the alias. In the example below, the database path specified as** file/files/mydatabase **is opened and the database alias xdb is assigned to the database. After this, the next connection to the specified alias will connect to the same database. The database path can also point to a mem: database. If you use database properties on the URL, these properties are used when the new database is created. If no database proprties are used on the URL, you can also specify the path with filepath=<path>. Examples below:

Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb;file:C:/files/
mydatabase", "SA", ""); 
Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/
xdb;mem:test;sql.enforce_types=true", "SA", "");
Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/xdb;filepath=file:C:/
files/mydatabase", "SA", "");

The path can be a file: or mem: database.

1 użytkowników online, w tym zalogowanych: 0, gości: 1