用于管理H2数据库的前端工具

blo*_*low 93 database h2 database-administration

如何使用H2数据库的集成管理前端?

对于诸如create table,alter table,add column等操作.

tra*_*god 85

我喜欢的SQuirreL SQL客户端,以及NetBeans的非常有用的 ; 但更常见的是,我只需启动内置org.h2.tools.Server和浏览端口8082:

$ java -cp /opt/h2/bin/h2.jar org.h2.tools.Server -help
Starts the H2 Console (web-) server, TCP, and PG server.
Usage: java org.h2.tools.Server 
When running without options, -tcp, -web, -browser and -pg are started.
Options are case sensitive. Supported options are:
[-help] or [-?]         Print the list of options
[-web]                  Start the web server with the H2 Console
[-webAllowOthers]       Allow other computers to connect - see below
[-webPort ]       The port (default: 8082)
[-webSSL]               Use encrypted (HTTPS) connections
[-browser]              Start a browser and open a page to connect to the web server
[-tcp]                  Start the TCP server
[-tcpAllowOthers]       Allow other computers to connect - see below
[-tcpPort ]       The port (default: 9092)
[-tcpSSL]               Use encrypted (SSL) connections
[-tcpPassword ]    The password for shutting down a TCP server
[-tcpShutdown ""]  Stop the TCP server; example: tcp://localhost:9094
[-tcpShutdownForce]     Do not wait until all connections are closed
[-pg]                   Start the PG server
[-pgAllowOthers]        Allow other computers to connect - see below
[-pgPort ]        The port (default: 5435)
[-baseDir ]        The base directory for H2 databases; for all servers
[-ifExists]             Only existing databases may be opened; for all servers
[-trace]                Print additional trace information; for all servers

  • 还要考虑`java -cp /opt/h2/bin/h2.jar org.h2.tools.Shell`. (3认同)
  • 在 1.4 中,您使用 `java -jar /opt/h2/bin/h2.jar` 运行控制台。 (2认同)

Joo*_*kka 33

怎么样H2控制台应用程序

  • +0例如`java -cp h2*.jar org.h2.tools.Console` (14认同)
  • 控制台应用程序很棒,可以通过http:http:// localhost:8082 /访问 (3认同)
  • 在eclipse下(如果你有H2依赖,例如通过maven)打开类`org.h2.tools.Console`然后右键单击并“作为Java应用程序运行” (2认同)

小智 20

我使用sql-workbench来处理H2和我必须处理的任何其他DBMS,它让我微笑:-)


vin*_*nay 12

我想建议DBEAVER .it基于eclipse并支持更好的数据处理


syn*_*ync 6

还有一个内置的shell客户端,非常方便.

java -cp h2*.jar org.h2.tools.Shell
Run Code Online (Sandbox Code Playgroud)

http://opensource-soa.blogspot.com.au/2009/03/how-to-use-h2-shell.html

$ java -cp h2.jar org.h2.tools.Shell -help
Interactive command line tool to access a database using JDBC.
Usage: java org.h2.tools.Shell <options>
Options are case sensitive. Supported options are:
[-help] or [-?]        Print the list of options
[-url "<url>"]         The database URL (jdbc:h2:...)
[-user <user>]         The user name
[-password <pwd>]      The password
[-driver <class>]      The JDBC driver class to use (not required in most cases)
[-sql "<statements>"]  Execute the SQL statements and exit
[-properties "<dir>"]  Load the server properties from this directory
If special characters don't work as expected, you may need to use
 -Dfile.encoding=UTF-8 (Mac OS X) or CP850 (Windows).
See also http://h2database.com/javadoc/org/h2/tools/Shell.html
Run Code Online (Sandbox Code Playgroud)