Investigating Bitbucket Server Database Schema

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

The purpose of this guide is to walk you through connecting to Bitbucket Server's embedded Hypersonic SQL Database using the Database Administration tool DBVisualizer. This will allow you to investigate the Bitbucket Server database schema.

Running Bitbucket connected to the embedded database is not supported in production environments. Production environments must have their own dedicated external database.

Please check Connect Bitbucket to an external database for more details.

On this page:

Read on for step by step instructions on how to Configure DbVisualizer and connect it to Bitbucket Server's HSQLDB database.

Solution

Prerequisites

  1. Download and install the latest copy of DBVisualizer.

  2. Create a backup of your database, which you will connect to.

  3. If you're using HSQL Embedded database, ensure that Bitbucket Server is not running or use DBVisualizer to connect to the backup of your database and not the actual production version.

Connection Procedure

Please ensure that you read and follow the instructions below carefully.

Ensure you

create a backup

of your data before attempting any modifications.

Create the Database Connection

  1. Open Connection Wizard.

    Screenshot: Opening the Connection Wizard

    (Auto-migrated image: description temporarily unavailable)

  2. Enter an identifiable name for the connection. For example: bitbucket

    Screenshot: Entering a Name for the Connection

    (Auto-migrated image: description temporarily unavailable)

  3. Click 'Next'.

Select a JDBC Driver

The example below assumes that you're trying to connect to HSQL database, if you're trying to connect to one of the External Databases then please define a driver for the target database.

  1. From the drop down list select HSQLDB Embedded

    Screenshot: Selecting a Database

    (Auto-migrated image: description temporarily unavailable)

  2. Click on Load Driver Files

  3. Browse to <Bitbucket Server Installation>/atlassian-bitbucket/web-inf/lib directory where the hsqldb*.jar file is located.

Select the Database Path

  1. Browse to your <BITBUCKET_HOME> directory if you are going to connect to your production database (Bitbucket Server is shutdown)

  2. Open the shared/data folder

  3. Select the db.log file

Enter the Connection Details

  1. Remove the .log from the end of db

    Screenshot: Entering Connection Details

    (Auto-migrated image: description temporarily unavailable)

  2. Type in sa for the username.

  3. Leave the password field blank

  4. Click on 'Finish' to complete the setup

    Refer to the example screenshot above if you are unsure.

Connect to the Embedded Database

  1. Select the connection from the list on the left hand side.

    If you're trying to connect to one of the External Databases then, select a different Database Type & Driver.

    Then specify a Database URL for your Database Type.

    Screenshot: Connecting to the Embedded Database

    (Auto-migrated image: description temporarily unavailable)

  2. You can now click on 'Connect' to connect to the embedded database.

Viewing the Tables and their References

  1. Click on tables on the left and references in the middle to see an image that displays all tables and shows references.

    (Auto-migrated image: description temporarily unavailable)

    These images apply to Bitbucket Server 4.0.2 tables. Please note that the tables will be different in different versions of the product.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.