H2

From ArchWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

From the project home page: H2 is a small Java based relation database, featuring:

  • Very fast, open source, JDBC API
  • Embedded and server modes; in-memory databases
  • Browser based Console application
  • Small footprint: around 2 MB jar file size

Installation

Install the h2AUR package.

Web Console / DB Management

This will launch a web based interface on port 8082.

$ h2-console

TCP / PG Server

This will launch a web based interface on port 8082, TCP server on port 9092, and PG server (a server that follows the PostgreSQL protocol) on port 5435

$ java -cp /usr/share/java/h2/h2.jar org.h2.tools.Server

One can connect using a JDBC url such as jdbc:h2:tcp://192.168.103.128:9092/~/test

Note: the -ifNotExists flag can be used to generate an empty database