Setting tcpPort on my H2 database server

538 views
Skip to first unread message

Sanjeev Sharma

unread,
Sep 13, 2012, 4:11:22 PM9/13/12
to h2-da...@googlegroups.com
Hi:
I am starting H2 database server - using the H2 API.  I want to change the server port to be something different from 9092.  How do I do it using the following API?  To be more specific what should be the argument that specifies the port.  I have tried -tcpPort=9001, -tcpPort:9001 etc - none seems to work - please help.  Thanks

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

Thomas Mueller

unread,
Sep 14, 2012, 12:06:20 AM9/14/12
to h2-da...@googlegroups.com
Hi

Try

new String[] { "-tcpPort", "9123", "-tcpAllowOthers" }).start();

Regards,

Thomas




--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/oa1_zuqyAYAJ.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Reply all
Reply to author
Forward
0 new messages