How to visualize H2 Database with IntelliJ Idea

In this article we will learn how to visualize an H2 Database using an IntelliJ free plugin that you can add to your IDE. By installing this plugin, you will also be able to insert SQL Statements from the SQL Console.

Overview of H2 Database

Firstly, if you are new to H2 Database, we recommend checking this article, to learn the different modes you can use to start the H2 DB: H2 Database Tutorial and expert Tips

Then, start H2 Database from the command line:

java -cp h2*.jar org.h2.tools.Server

You should be able to see the following Console Log:

TCP server running at tcp://127.0.1.1:9092 (only local connections)
PG server running at pg://127.0.1.1:5435 (only local connections)
Web Console server running at http://127.0.1.1:8082 (only local connections)

Installing IntelliJ Idea Database navigator

Launch IntelliJ Idea and choose Settings | Plugins. Then, look for this plugin:

H2 Database IntelliJ Idea

Then restart your IDE. Open the DB Browser View and configure the H2 Database in it:

Visualize H2 Database with IntelliJ Idea

That’s all! Now you can check your H2 Database from the DB Browser View:

H2 Database with IntelliJ Idea

Now you can use the SQL Console to execute SQL Statements. You will be able to visualize the Database structure and Data from the DB Browser Console.

Conclusion

This article was a quick walk through the configuration of IntelliJ Plugin Database Navigator to connect to an external H2 Database


Recommended Articles

Visualize Database Connection Pool Performance with JDBC Performance Logger in WildFly and JBoss AS

Monitor database connections graphically and gain insights into your application's database activity using the free JDBC Performance Logger tool. Learn how to integrate it with WildFly and JBoss AS.

Effortlessly Export and Verify Data in Your In-Memory H2 Database Using Java

Discover how to export data from your in-memory H2 database using JPA and Spring Boot. Learn the SCRIPT command method for generating SQL scripts.

Configure WildFly 11 Elytron JDBC Realm with MySQL Database - Step-by-Step Guide

Learn how to configure an Elytron JDBC Realm on WildFly 11 using both Web Console and CLI. Prerequisites: MySQL Database, WildFly 11 or newer.

H2 Database Tutorial and Expert Tips

H2 Database tutorial: embedded, server and mixed mode explained, WildFly/JBoss EAP datasource setup, monitoring via the H2 Console, and fixes for the most common H2 errors (2.4.240).