Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frontend tool to manage H2 database [closed]

How to use H2 database's integrated managment frontend?

For operations such as create table, alter table, add column, and so on.

like image 900
blow Avatar asked May 03 '10 20:05

blow


People also ask

How do I make my H2 database persistent?

If we want to persist the data in the H2 database, we should store data in a file. To achieve the same, we need to change the datasource URL property. In the above property, the sampledata is a file name.

How can I see my H2 database in my browser?

Access the H2 Console You can access the console at the following URL: http://localhost:8080/h2-console/. You need to enter the JDBC URL, and credentials. To access the test database that the greeter quickstart uses, enter these details: JDBC URL: jdbc:h2:mem:greeter-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1.

How do I run H2 database locally?

Click Windows → type H2 Console → Click H2 console icon. Connect to the URL http://localhost:8082. At the time of connecting, the H2 database will ask for database registration as shown in the following screenshot.


2 Answers

I like SQuirreL SQL Client, and NetBeans is very useful; but more often, I just fire up the built-in org.h2.tools.Server and browse port 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 
like image 181
trashgod Avatar answered Nov 05 '22 01:11

trashgod


How about the H2 console application?

like image 22
Joonas Pulakka Avatar answered Nov 05 '22 01:11

Joonas Pulakka