lbehnke / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Feature Request - Support for connection aliases for remote tcp connections #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Instead of specifying direct path to database when connect to h2 in tcp 
mode it would be very useful and secure (this is not secure to show real 
path for remote) use aliases.

Aliases could be stored in file like: aliases.conf and searched in class-
path.

aliases.conf could have very simple format:
<alias_name> = <path>
Example:
mydb = c:/h2-bases/mydb

and connection URL could be like this
jdbc:h2:tcp://dbserv:8084/mydb

With help of aliases it would be very simple to db admin to switch between 
bases by modifing one file: aliases.conf

For reference: Firebird database has such ability.
see http://www.janus-software.com/fbmanual/manual.php?book=admin&topic=4

Original issue reported on code.google.com by kua...@gmail.com on 24 Sep 2009 at 7:14

GoogleCodeExporter commented 9 years ago
Hi,

Did you know you can specify an base path for databases when starting the 
server,
using the option -baseDir - see also
http://h2database.com/javadoc/org/h2/tools/Server.html#main(String...)

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 25 Sep 2009 at 3:38

GoogleCodeExporter commented 9 years ago
Yes, I know.

But I think 'aliases.conf' would be more powerful and useful.
With '-baseDir' you can specify only one dir, with 'aliases.conf' your bases 
could 
be anywhere on server.

And more important, by removing (or comment out) lines in 'aliases.conf', 
db-admin 
can close access to particular database and with '-baseDir' it is impossible to 
close access to one databases not closing others.

Anyway, this request not hi priority, I just interesting about your opinion - 
this 
is worth to implement or not?

Original comment by kua...@gmail.com on 26 Sep 2009 at 2:45

GoogleCodeExporter commented 9 years ago
Hi,

I agree this would be a nice feature. I will add it to the roadmap at
http://www.h2database.com/html/roadmap.html

You can still add comments to this issue. If you want to create a patch you are
welcome, see also: http://www.h2database.com/html/build.html#providing_patches -
however I'm not sure yet how exactly I would like to add this feature, so if 
you want
to create a patch please first tell me how you like to solve the problem in 
detail.

Regards,
Thomas

Original comment by thomas.t...@gmail.com on 27 Sep 2009 at 1:20