User Tools

Site Tools


jira_sql_queries

This is an old revision of the document!


Jira SQL Queries

Below is the list of SQL queries to perform tasks directly on the database. Please note that you should always shut down Jira & backup your database before performing any of these queries.

Find user abc

select * from cwd_user where lower_user_name = 'abc'

Query on groups

SELECT * from cwd_group

Query on jira directories

select * from cwd_directory

Select all but 3 users from Jira Internal Directory

select * from cwd_user where directory_id = 1 and (user_name != 'abc' and user_name != 'cde' and user_name != 'sysadmin');

Disable user directory

select id, directory_name, active from cwd_directory;

Then you want to use this information to disable the directory

update cwd_directory set active=0 where id=123456;
jira_sql_queries.1499956817.txt.gz · Last modified: 2017/07/13 10:40 by pawel