How to look into the HSQLDB?

Jayashree Shetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2014

I have installed the atlassian JDK. Now i want to look into all the projects that i createdby looking into the DB. Since i am using HSQLDB and also i have atlassian SDK installed, how can i see the tables list, their columns in the DB? I did refer https://confluence.atlassian.com/display/JIRA/Running+SQL+commands+in+a+HSQL+databasebut i am unable to find database subdirectory if i go by the tutorial link. I think since i installed SDK version of it this could be the reason. But can anyone help me to know is it still possible to look into the HSQLDB columns,tables if we have atlassian SDK?

4 answers

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2014

You need to find the database.log file - look in your plugin directory for target/jira/home

Jayashree Shetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2014

Yes got it fixed. I wasnt referring to the locarion of the plugin which i was developing instead was looking into jira home db

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2015

i was unable to find that file. this is the content of target/jira/home for a JIRA 5.2.11 plugin made with SDK drwxrwxr-x 3 alexej alexej 4096 Jan 16 17:55 caches drwxrwxr-x 3 alexej alexej 4096 Jan 16 17:55 data -rw-rw-r-- 1 alexej alexej 411 Mai 28 2014 database.properties -rw-rw-r-- 1 alexej alexej 3859074 Jan 16 17:55 database.script -rw-rw-r-- 1 alexej alexej 325 Jan 16 17:55 dbconfig.xml drwxrwxr-x 2 alexej alexej 4096 Jan 16 17:55 export drwxrwxr-x 4 alexej alexej 4096 Jan 16 17:55 import drwxrwxr-x 2 alexej alexej 4096 Jan 16 17:55 log drwxrwxr-x 2 alexej alexej 4096 Jan 16 17:55 logos drwxrwxr-x 2 alexej alexej 4096 Jan 16 17:55 monitor drwxrwxr-x 5 alexej alexej 4096 Jan 16 17:55 plugins

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2015

this answer is not complete. Yes, it is clear how to start the hsqldb manager. But it is not clear where is the database. I've looken in every folder of a JIRA plugin and could not locate the database file itself.

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

fixed: correct file name for jira is database.script and not database.log as claimed in the answer.

0 votes
Adrian Moerchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014

My preferred tool is

But you may try

too.

0 votes
Onkar Ahire
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2014
Jayashree Shetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014

Thanks Onkar. I could get the HSQLdb manager as i listed in the comment section above. But i didnt get any tables in it. When i run the jira i can see some projects, but when i check in the tables list of the db manager there's nothing in it. why is it this way?

I followed this tutotial https://confluence.atlassian.com/display/JIRA/Running+SQL+commands+in+a+HSQL+database

Command : The below shows the command at the workign directory command prompt

D:\MY WORK\View Issue Plugin\tutorial-jira-add-content-to-view-issue-screen\target\jira\webapp\WEB-INF\lib> java -cp hsqldb-1.8.0.5.jar org.hsqldb.util.DatabaseManager -user sa -url jdbc:hsqldb:D:/MY WORK/View Issue Plugin/tutorial-jira-add-content-to-view-issue-screen/target/jira/home/database/jiradb

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 9, 2014

If this is returning no tables, then you're looking in the wrong place - you've pointed it at an empty hsql database.

Onkar Ahire
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2014

Nic is right Jayashree, Please check the place properly.

Cheers,

Alexej Geldt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2015

what is the correct place? For me it is definetely not /target/home/jira. There is no database, just a database script.

0 votes
Jayashree Shetty
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2014

In my scenario i have installed the atlassian jdk in D: drive. So this was the path D:\JIRA\amps-standalone\target\jira\webapp\WEB-INF\lib where my hsqldb-1.8.0.5 JAR FILE was present. Now in cmd prompt navigate to the this path D:\JIRA\amps-standalone\target\jira\webapp\WEB-INF\lib . Run this command java -cp hsqldb-1.8.0.5.jar org.hsqldb.util.DatabaseManager. You should be able to view the HSQL database. Default user id is sa and password is blank.

Suggest an answer

Log in or Sign up to answer