Re: HSQL Server on Linux

Andreas Säger <[email protected]> Mon, 1 Jan 2018 13:21:40 +0100
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <[email protected]>
Am 31.12.2017 um 21:31 schrieb Fred Toussi via Hsqldb-user:
> Hi Andreas,
> 
> I think the problem is here:
> 
> urlid test
> url jdbc:hsqldb:hsql://localhost
> username SA
> password
> 
> The urlid is a handle you have defined for SqlTool. You need to specify the name that corresponds to server.dbname.0 on the URL itself like this:
> 
> urlid testserver
> url jdbc:hsqldb:hsql://localhost/test
> username SA
> password
> 
> Regards
> 


Happy new year and thank you for the answer. Now I can start hsqldb as a
system service with PID, log file
and everything.
The naming conventions are somewhat confusing.
Let's see if I understood something at last.

In server.properties I defined a database alias:
  server.dbname.0=test

Because of the "test" the corresponding url in sqltool.jar needs to be
  url jdbc:hsqldb:hsql://server_name/test
because test refers to dbname.0 in server.properties.

However in /etc/hsqldb.conf I need to declare
  URLIDS='testserver'
because this name refers to the urlid in the given AUTH_FILE

Is this correct?

-------------

Looking back, I was confused by the following comment on URLIDS in
samples/hsqldb.cfg

> # NEW AND IMPORTANT!!!
> # As noted at the top of this file, this setting replaces the old property
> # settings server.urlid.X.
> # Simply list the URLIDs for all DB instances which your *Server starts.
> # Usually, these will exactly mirror the server.database.X settings in your
> # server.properties or webserver.properties file.

Actually, the URLID does not occur in server.properties.
server.database.0 specifies a file path with a file name prefix
server.dbname.0 specifies an alias name for the URL.
The URLID is declared in sqltool.rc

And the following example in samples/sqltool.rc does not include the
dbname.X specified in server.properties whereas the other examples
include that name:
> # This is for a hsqldb Server running with default settings on your local
> # computer (and for which you have not changed the password for "SA").
> urlid localhost-sa
> url jdbc:hsqldb:hsql://localhost
> username SA
> password

Regards
Andreas


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot