How to query my jira database?

I have a rather big Jira database and would like to create a filter that displays users that haven’t been online for x amount of time. My problem is I don’t know how to import my Jira database to a sql server. Jira API’s does not provide any methods to retrieve last logged in information.

So my question is how do I start writing sql queries directly to my Jira database?

Hi @oskar.granlund,

you should be able to find the connection details of your JIRA database in the dbconfig.xml file in your JIRA home directory.

Using that information you can connect a SQL client to your JIRA database.

And you can find the full JIRA database scheme information here: https://developer.atlassian.com/jiradev/jira-platform/jira-architecture/database-schema

Cheers,
Peter

For what it’s worth, there are also add-ons like https://marketplace.atlassian.com/plugins/cr.tin.ActiveUserFilter.active-user-filter/server/overview which allow you to export your users to CSV and then parse it from there. Disclosure: I am the author of that add-on.