Querying the JIRA database online

In the previous recipe, we looked at how to view JIRA log files online, which is a very convenient way to troubleshoot problems. In this recipe, we will continue with this by looking at how you can run queries against the JIRA database from the JIRA UI directly.

Getting ready

For this recipe, we need to have the JIRA Home Directory and DB Browser add-on installed. You can download it from the following link and install it with the UPM:

https://marketplace.atlassian.com/plugins/info.renjithv.jira.plugins.sysadmin.homedirectorybrowser/server/overview

How to do it...

Perform the following steps to query the JIRA database directly in the JIRA UI:

  1. Navigate to Administration | Add-ons | Db Console.
  2. Select the database table to query from.
  3. Select the columns to include as part of the query, or leave it blank for all the columns.
  4. Optionally, you can construct your own queries in the Enter SQL text field.
  5. Click on the Execute button to run the SQL query, as shown in the following screenshot:
    How to do it...

How it works...

The Db console opens up a direct connection to JIRA's database, allowing you to run any SQL statement just as if you are using a native SQL client.

It is a great tool to run the SELECT queries, which are read-only, but care must be taken, since you are allowed to run any arbitrary valid SQL statement, including INSERT and UPDATE. Direct data manipulation is discouraged, as it might lead to irreversible data corruption and system outages.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset