Connecting to HSQLDB using DBVisualizer or HSQL database manager

The purpose of this guide is to walk you through connecting to Confluence's embedded Hypersonic SQL Database using the Database Administration tool DBVisualizer  or HSQLDB's database manager.

Below are step by step instructions on how to Configure DBVisualizer or HSQLDB Database Manager and connect it to HSQLDB.

On this page:

Connecting using DB Visualizer

Prerequisites

  1. Download and install the latest copy of DBVisualizer.
  2. You will also need to download a copy (preferably the latest version) of HSQLDB
  3. Extract the contents of the HSQLDB archive
  4. Ensure that Confluence is not running.

Connection Procedure

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

Remember to backup your <confluence-home>/database folder before attempting any modifications

1. Enter Connection Name

  1. Click on the icon highlighted in Red
  2. Enter an identifiable name for the connection. e.g. conf2.5.4-std

2. Select JDBC Driver

  1. From the drop down list select HSQLDB Embedded
  2. Click on Load Driver Files
  3. Browse to directory where the HSQLDB.jar file is located. Confluence bundles this and it can be found at <confluence-installation>/confluence/WEB-INF/lib/hsqldb-*.jar.

3. Select Database Path

  1. Browse to your <Confluence-Home> directory
  2. Open the Database folder
  3. Select the confluencedb.properties file

4. Enter Connection Details

  1. Remove the ".properties" from the end of confluencedb
  2. Type in sa for the username
  3. Leave the password field blank

refer to the example screenshot above if you are unsure

5. Connect to embedded Database

  1. Click on Test Connection to verify that the details are correct.
  2. Click on "Finish" to complete the setup
  3. Select the connection from the list on the left hand side.
  4. You can now click on "Connect" to connect to the embedded database.

Connecting using HSQL Database Manager

Alternatively, you can use HSQLDB's database manager. Just copy the value of hibernate.connection.url in confluence.cfg.xml as the URL and you're good to go.

Below are step by step instructions on how to Configure HSQL DB Manager and connect it to HSQLDB:

Remember to backup your <confluence-home>/database folder before attempting any modifications

  1. Download and extract the latest copy of HSQL DB
  2. Navigate to hsqldb-x-x-x/hsqldb/bin, and run runManager.bat
  3. Copy the URL value in your hibernate.connection.url parameter in ConfluenceHomeDirectory/confluence.cfg.xml. Example:

    <property name="hibernate.connection.url">jdbc:hsqldb:C:\reproduce\atlassian-confluence-5.4.4\c544homeHSQL/database/confluencedb;hsqldb.tx=MVCC</property>


    For the example above, you should copy: jdbc:hsqldb:C:\reproduce\atlassian-confluence-5.4.4\c544homeHSQL/database/confluencedb;hsqldb.tx=MVCC

  4. In HSQLDB Manager's Connect dialog, paste the URL

    Leave the Password empty, and User as "SA"
  5. Click OK

You can now run queries in the query window. For example:

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport