Investigating Fisheye & Crucible database schema
The purpose of this guide is to show you how to connect to Fisheye/Crucible's embedded Hypersonic SQL (HSQL) database using a database administration tool called DbVisualizer so you can investigate the Fisheye/Crucible database schema.
- Download and install the latest copy of DBVisualizer.
- Create a backup of the HSQL database and connect DbVisualizer to the copy (backup) of the database rather than the actual database.
- The reason why we make such recommendation is because DbVisualizer will not be able to connect to the HSQL database while Fisheye/Crucible is running. Either you create a copy of the database and connect to the copy or stop Fisheye/Crucible before attempting to connect DbVisualizer to it.
Please ensure that you read and follow the instructions below carefully.
Creating a new database connection
- Open the Connection Wizard.
- Enter an identifiable name for the connection. For example:
- Click 'Next'.
Selecting a JDBC Driver
The example below assumes that you're trying to connect to an HSQL database. If you're trying to connect to an external database then please choose the appropriate driver for the target database.
Fisheye/Crucible ship with the JDBC drivers inside the FISHEYE_HOME/lib/ directory.
- From the drop down list select HSQLDB embedded.
- Click the Load Driver File(s) button.
- Browse to FISHEYE_HOME/lib directory where the hsqldb*.jar file is located. For example: /atlassian/apps/fisheye/lib/hsqldb-22.214.171.124.jar.
Entering the connection details
Browse to your FISHEYE_HOME directory if you are going to connect to your production database or browse to your expanded <<Backup>> directory that was created when you unzipped the backup file you made (if you just want to run some queries against your data).
Fisheye/Crucible cannot be running if you attempt to connect to your production database.
- Open the /var/data/crudb folder.
- Select the crucible.properties file
- Remove the .properties from the file name.
- Type in sa for the username.
- Leave the password field blank.
- Click on Ping Server to verify that the details are correct.
- Click on 'Finish' to complete the setup.
Connecting to the embedded database
Select the connection from the list on the left hand side.
If you're trying to connect to one of the external databases make sure to select a different Database Type & Driver (JDBC).
After that specify a Database URL for your Database Type. You can look at your FISHEYE_HOME/config.xml file if you are not sure what is the database url and the credentials you should be using.
- You can now click on 'Connect' to connect to the embedded database.
Viewing tables and references
- Click on any table on the left and the References tab to see a graph that displays references to that table:
- Alternatively you can also click on Tables (from the left menu) and on the References tab to see all of the tables in the database together with all the references. The following image was taken from the Fisheye/Crucible 4.8.7 database schema and is just an illustration/ example. If you're looking to explore the database schema you should not rely on this image alone and rather follow the steps outlined in this page so you can browse through the database on your own. Please note that the tables might differ between different versions of Fisheye/Crucible.