I have created database with my own program and it appeared as mydatabase.mv.db
file.
But when I tried to access the same database with DbVisualizer
, with apparently same parameters, it created two files mydatabase.lock.db
and celebrity.h2.db
and didn't see tables, created in the program.
What was the incompatibility?
UPDATE
both setups are follows:
Connect to the embedded H2 database using the H2 console Alternatively you can connect using the browser based H2 console. The easiest way to access the console is to double click the H2 database jar file at <installation-directory>\confluence\WEB-INF\lib\h2-x.x.x.jar .
And in case it's not obvious, on Linux/MacOSX systems the H2 database files are stored under the path in the JDBC URL, so ~/test would be found at $HOME/test.
H2 Console By default, the console view of the H2 database is disabled. Before accessing the H2 database, we must enable it by using the following property. Once we have enabled the H2 console, now we can access the H2 console in the browser by invoking the URL http://localhost:8080/h2-console.
What is Keycloak. mv. db? Keycloak, an open source identity and access management solution our Broker utilizes, comes with its own embedded Java-based relational database called H2. This database, keycloak.
In H2 version 1.3.x, the database file <databaseName>.h2.db
is the default. (The storage engine "PageStore" is used).
In H2 version 1.4.x, the database file <databaseName>.mv.db
is the default. (The storage engine "MVStore" is used). The MVStore is still beta right now (November 2014). But you can disable the MVStore by appending ;mv_store=false
to the database URL.
The accepted answer is now several years old and since others may be looking for a more "current" solution...
To get it to work just update the H2 JDBC driver that DBVizualizer uses. Basically download the "Platform-Independent Zip" from http://www.h2database.com/html/download.html and copy the h2/bin/h2-X.X.X.jar
file to ~/.dbvis/jdbc/
and then restart DBVizualizer so it can pick up the updated driver.
Also, make sure you remove .mv.db
from the file name when setting the Database file name in DBVizualizer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With