has anyone connected to the H2 tcp server from a third party client tool like razorsql?

64 views
Skip to first unread message

bruce buchanan

unread,
Dec 12, 2013, 10:51:17 AM12/12/13
to h2-da...@googlegroups.com
somebody must have done this, I cant get it to work

thanks

Atul Chowdhury

unread,
Dec 12, 2013, 12:33:54 PM12/12/13
to h2-da...@googlegroups.com
We  - and thousands others I'm sure, connect to H2/TCP all the time; surely it's a configuration issue on your side.
 
From DbVisualizer I use:
 
jdbc:h2:tcp://megaxi3:9092/mmdb
 
(more configuration properties: http://d.pr/i/BSsm )
 
And from the H2 server side:
 
Server.createTcpServer(new String[]{
                    "-tcpPort", Integer.toString(port), "-tcpAllowOthers", "-baseDir", System.getProperty("user.dir") + "/db", "-ifExists"}).start();
 
...where "/db" is a classpath folder where we place the "mmdb" database (real filename: mmdb.h2.db but h2 doesn't require the ".h2.db" suffix and actually won't work if you include it)

Good luck.
On Thu, Dec 12, 2013 at 10:51 AM, bruce buchanan <bruce.t....@gmail.com> wrote:
somebody must have done this, I cant get it to work

thanks

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Bruce Buchanan

unread,
Dec 12, 2013, 11:18:30 PM12/12/13
to h2-da...@googlegroups.com
yes! thank you! it was the last param "-baseDir" which seems to be undocumented... where'd you find it?
> You received this message because you are subscribed to a topic in the Google Groups "H2 Database" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2-database/YY79hzAy0cg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to h2-database...@googlegroups.com.

Thomas Mueller

unread,
Dec 13, 2013, 3:11:31 PM12/13/13
to H2 Google Group
Hi,

it was the last param "-baseDir" which seems to be undocumented... where'd you find it?

Hm, it sounds like the documentation should be improved. Where would you expect to find it documented? It is documented here:


and indirectly here:

http://www.h2database.com/html/tutorial.html#using_server - if you run "java -cp h2*.jar org.h2.tools.Server -?"

Regards,
Thomas

Bruce Buchanan

unread,
Dec 13, 2013, 5:30:07 PM12/13/13
to h2-da...@googlegroups.com
thomas, thanks for your patience...

the place I was looking was here:


static Server createTcpServer(String... args) throws SQLException
Create a new TCP server, but does not start it yet. Example:
Server server = Server.createTcpServer(
new String[] { "-tcpPort", "9123", "-tcpAllowOthers" }).start();

Parameters:
args - the argument list
Returns:
the server



hence my failure to launch. but when I see them all lined up there are lots and lots... maybe a link to the full list anyplace you see the partial list?

Thomas Mueller

unread,
Dec 18, 2013, 4:54:25 PM12/18/13
to H2 Google Group
Hi,

You are right. In the next release, the javadocs should be fixed. Thanks for your help!

Regards,
Thomas

Reply all
Reply to author
Forward
0 new messages