How to access H2 Database

HOW TO ACCESS H2 DATABASE USING DBVISUALIZER:

I am using dbVisualizer to open h2 database. Goto tools–>driver manager–>select driver name (h2) then, add h2-1.3.176.jar from your file location. And you also have to do it for (h2 embedded) driver in there.

First I make backup copy of the database mydb-prodD.h2.db.bck in another location. Then I tried to access the database named [mydb-prodD.h2.db] which I currently placed in this location i.e. E:testdbmydb-prodD.h2.db . I am using dbVisualizer (free edition). But while putting the name in the JDBC URL, please do not put [h2.db] extension with it.

Now whole URL name for accessing my H2 database is [E:testdbmydb-prodD;AUTO_SERVER=TRUE;MODE=MYSQL;LOCK_MODE=0;DB_CLOSE_DELAY=-1 ].

Now we will see all the generated user or default table in there.

h2 db access

HOW TO ACCESS H2 DATABSE USING BROWSER MODE:

My h2 server is located at C:h2-2014-04-05h2binh2.bat. Now if I try to access it by running [C:h2-2014-04-05h2binh2.bat] it will open a browser window.

THE MOST INTERESTING PART IS NOW WE CAN CONNECT TO THIS DATABASE ANYTIME USING THIS URL (until you shutdown /totally logoff from your computer). BECAUSE USING DBVISUALIZER IT MAKES THE DATABASE INACCESSIBLE WITHOUT ANY REASON.

Now you can see all available (generated table) data of that database.