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: Database schema

Cheers,
Peter

For what it’s worth, there are also add-ons like Atlassian Marketplace which allow you to export your users to CSV and then parse it from there. Disclosure: I am the author of that add-on.