On this page
Connect to H2
The H2 driver is included in BroadSQL, and every installation already has one H2 connection: WORLD, the sample database.
| Driver | Bundled with BroadSQL (H2 2.3.232); nothing to download. |
|---|---|
Type to choose in ADD CONNECTION or CONFIG | H2 |
| URL format | jdbc:h2:<path>/<database> or jdbc:h2:tcp://<host>/<path>/<database> |
| Example | jdbc:h2:./samples/WorldDB |
| Where the URL format comes from | H2 Features: Database URL Overview, checked October 17, 2026 |
| Verified with BroadSQL | Verified: the WORLD sample of every installation uses this example URL, and the session outputs of the Connections guide were captured on H2 databases. |
Embedded or server
| Mode | URL | When |
|---|---|---|
| Embedded file | jdbc:h2:./samples/WorldDB | A database file that only this BroadSQL opens |
| Server (TCP) | jdbc:h2:tcp://dbhost/mydb | A database served by an H2 server, shared by several clients |
| In memory | jdbc:h2:mem:scratch | A throwaway database, gone when the connection closes |
In an embedded URL, the file name is given without its .mv.db extension. A relative path is resolved from the BroadSQL installation folder.
Steps
ADD CONNECTION MYH2;(orCONFIG;on Windows), typeH2, URL, user and password.CONNECT MYH2;.
The local H2 databases that DUMP ... AS H2 creates are registered automatically: there is nothing to add for them.
On H2
SET PASSWORDchanges the password of an H2 account, then checks it with a new connection before saving it.LINK TABLEworks when the current connection is H2.- DDL statements commit the open transaction on H2. In a Production Environment, the confirmation question says so.
- BroadSQL's own configuration database is an H2 file too, but it can never be opened as an ordinary connection: see The configuration database.
Related
Found something wrong or unclear on this page? Tell us, with the page address.