This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to:
h2*.jar
to the classpath (H2 does not have any dependencies)
org.h2.Driver
jdbc:h2:~/test
opens the database test
in your user home directory
The Console lets you access a SQL database using a browser interface.
[画像:Web Browser - H2 Console Server - H2 Database]
If you don't have Windows XP, or if something does not work as expected,
please see the detailed description in the Tutorial.
Install the software using the Windows Installer (if you did not yet do that).
Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]:
Screenshot: start H2 Console
A new console window appears:
Screenshot: H2 running
Also, a new browser page should open with the URL http://localhost:8082.
You may get a security warning from the firewall. If you don't want other computers in the network to access the database
on your machine, you can let the firewall block these connections. Only local connections are required at this time.
Select [Generic H2] and click [Connect]:
Screenshot: login
You are now logged in.
Click on the [Sample SQL Script]:
Screenshot: click on the sample SQL script
The SQL commands appear in the command area.
Click [Run]
Screenshot: click Run
On the left side, a new entry TEST is added below the database icon.
The operations and results of the statements are shown below the script.
Screenshot: see the result
Click on [Disconnect]:
Disconnect icon
to close the connection.
Close the console window. For more information, see the Tutorial.