Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to access SQL in Jira

todd_palermo_na_honda_com
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2023

I am getting support from a plugin and they want me to run a SQL query on Jira. I see a lot of information on SQL queries, but none on how to get to the location to type the SQL string. What am I missing. I seem to remember doing this before in 8.5, but I cannot find this feature in 9.4 Data Center.

1 answer

1 accepted

2 votes
Answer accepted
Radek Dostál
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.
June 22, 2023

That's something you might want to discuss with your system admin (those that maintain the backend, installed the db, etc.).

Jira does not have any direct SQL interface unless one is provided/made by a plugin.

Plugins aside, normally, the database is running on a server, you need to know where it runs, which database "name" Jira is using, and a user that has access to that database. All of which are configured in { jira_home }/dbconfig.xml

You also use clients to talk with it, and different database types use different clients. For example, PostgreSQL (which should be the most common with Jira) packs 'psql' which is a command line interface - https://wiki.postgresql.org/wiki/PostgreSQL_Clients#psql

 

Again though, it's best to discuss this with someone familiar with the backend since there are some technicalities as you can see, and touching production databases without knowing exactly what you're doing can be dangerous.

Nic Brough -Adaptavist-
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.
June 22, 2023

If the query is read-only, it's likely to be safe - the worst you can do is overload your database server, leading to poor performance or even a crash of the service.

Never write to an Atlassian database unless expressly instructed to by support, and only do it when the service is not running, and you've taken a full backup of it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.2
TAGS
AUG Leaders

Atlassian Community Events