Accessing Bamboo's H2 embedded database
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
While the H2 database is not supported for production environments, sometimes admins will need access for testing purposes. The most likely use case is to get into an instance where you are locked out. You can access H2 through a Database Administration tool, Java GUI, or through the command line.
Bamboo must be shut down before accessing the H2 database. It is also highly recommended to back up your data before making any changes.
Solution
Connect to the embedded H2 database using DB Visualizer
If you need to make changes directly in the database, and you're using the H2 database, here's how you can connect to it using DBVisualizer.
DBVisualizer is just one database administration tool. You can use any administration tool that supports embedded H2 databases. The steps will be similar.
Shut down Bamboo.
Back up your
<bamboo-home>/database
directory.Launch DBVisualizer
Add the H2 db driver which is embedded in Bamboo installer:
Go to Tools >> Driver manager
Locate the driver H2 embedded
Add a new driver file path to <Bamboo_Install>/lib/h2-1.4.xxx.jar
Move the driver to the top of the list
Choose Create new database connection and follow the prompts to set up the connection.
The information you'll need is:
Database driver: H2 embedded
Database Userid: sa
Database password: leave this field blank
Database filename:
<bamboo-home>/database/h2
⚠️ leave off the
.h2.db
file extension.
Connect to the database.
Refer to the DBVisualizer documentation for help using DBVisualizer.
Connect to the embedded H2 database using Java GUI
Locate the H2 .jar file (h2-1.4.x.jar
) in your Bamboo installation directory:
1
<BAMBOO_INSTALL>/atlassian-bamboo/WEB-INF/lib/
From that folder, launch the GUI interface by entering the following command:
1
java -jar h2-1.4.194.jar
This will result in a browser opening, and you will be presented with a UI which looks something like this:

Enter the JDBC URL field using the string found in the "hibernate.connection.url" property in <bamboo-home>/bamboo.cfg.xml
For example:
1
2
<property name="hibernate.connection.url">jdbc:h2:${bambooHome}/database/h2</property>
ℹ️ Replace the {bambooHome} variable with the real path to the bamboo-home folder
1
jdbc:h2:file:/real/path/to/your/<bamboo-home>/database/h2
The default credentials are:
User Name | Password |
---|---|
sa | None (leave blank). |
Connect to the embedded H2 database using Command Line
Locate the H2 .jar file (h2-1.4.x.jar
) in your Bamboo installation directory:
1
<BAMBOO_INSTALL>/atlassian-bamboo/WEB-INF/lib/
From that folder launch the command line interface by entering the following command:
1
java -cp h2-1.4.194.jar org.h2.tools.Shell
You will be prompted to enter the following database URL, JDBC driver, user name, and password:
URL | JDBC Driver | Username | Password |
---|---|---|---|
The <url> string from <bamboo-home>/bamboo.cfg.xml - see example above. | org.h2.Driver | sa | None (leave blank, sometimes you will have to hit enter twice) |
If successful, you should be presented with a sql>
prompt, and can run any queries needed.
Was this helpful?