Cách sử dụng giao diện quản lý tích hợp của H2 database?Công cụ giao diện người dùng để quản lý cơ sở dữ liệu H2
Đối với các hoạt động như tạo bảng, thay đổi bảng, thêm cột, v.v.
Cách sử dụng giao diện quản lý tích hợp của H2 database?Công cụ giao diện người dùng để quản lý cơ sở dữ liệu H2
Đối với các hoạt động như tạo bảng, thay đổi bảng, thêm cột, v.v.
Tôi thích SQuirreL SQL Client và NetBeans hữu ích ngay cả khi không có hình đẹp plugin, được thảo luận here; nhưng thường xuyên hơn, tôi chỉ cháy lên các built-in org.h2.tools.Server
và duyệt cổng 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
Trong 1.4, bạn chạy bảng điều khiển với 'java -jar/opt/h2/bin/h2.jar'. – approxiblue
Cũng xem xét 'java -cp /opt/h2/bin/h2.jar org.h2.tools.Shell'. – trashgod
Làm thế nào về H2 console application?
+0 e.g. 'java -cp h2 * .jar org.h2.tools.Console' –
Ứng dụng giao diện điều khiển rất tuyệt và có thể được truy cập qua http: http: // localhost: 8082/ –
Dưới nhật thực (nếu bạn có phụ thuộc H2, thông qua maven cho ví dụ) mở lớp 'org.h2.tools.Console' rồi nhấp chuột phải và" chạy dưới dạng ứng dụng Java " – pdem
tôi sử dụng sql-workbench để làm việc với H2 và bất cứ DBMS khác mà tôi phải đối phó với nó và làm cho tôi mỉm cười :-)
Tôi đang sử dụng nó với derby – blueray
một thảo luận tìm thấy here
trích dẫn từ Thomas Mueller:
http://www.dbsolo.com/
http://www.minq.se/products/dbvis/
http://executequery.org/index.jsp
http://sqldeveloper.solyp.com/index.html
http://sql-workbench.net/index.html
http://www.squirrelsql.org/
Tôi muốn đề nghị DBEAVER .it được dựa trên nhật thực và hỗ trợ tốt hơn xử lý
tôi sẽ đề nghị IDE JetBrain của dữ liệu: DataGrip https://www.jetbrains.com/datagrip/
Có một khách hàng vỏ được xây dựng trong quá là tiện dụng.
java -cp h2*.jar org.h2.tools.Shell
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
Nếu bạn đang chạy nó như là một cơ sở dữ liệu nhúng vào mùa xuân tôi sử dụng cấu hình sau đây để cho phép tích hợp trong ứng dụng web khi ứng dụng chính đang chạy:
<!-- Run H2 web server within application that will access the same in-memory database -->
<bean id="h2Server" class="org.h2.tools.Server" factory-method="createTcpServer" init-method="start" destroy-method="stop" depends-on="h2WebServer">
<constructor-arg value="-tcp,-tcpAllowOthers,-tcpPort,9092"/>
</bean>
<bean id="h2WebServer" class="org.h2.tools.Server" factory-method="createWebServer" init-method="start" destroy-method="stop">
<constructor-arg value="-web,-webAllowOthers,-webPort,8082"/>
</bean>
Tôi sử dụng DbVisualizer rất nhiều cho chính quyền H2-db.
Có tồn tại một phiên bản miễn phí:
Xem trang web H2 cho một danh sách [Cơ sở dữ liệu frontend/Công cụ] (http://h2database.com/html/links.html#tools) . –
Địa điểm thích hợp hơn cho Câu hỏi này là trên [Trao đổi ngăn xếp đề xuất phần mềm] (http://softwarerecs.stackexchange.com/). Nhưng ở đó bạn phải phác thảo các tiêu chí cụ thể cho những gì bạn muốn nói là “tốt nhất”. –