User table

The cwd_user table is used to store a user in the system. Let's check the structure of this table.

The table structure

Run the following query:

desc cwd_user;

The output of the query is as follows:

The table structure

Finding the list of inactive JIRA users

One of the main responsibilities of JIRA administrators is user management. Let's say you want to find the list of inactive users along with their directory information. In big JIRA instances, it may be possible that there are users in JIRA's internal directory as well as users from corporate LDAP.

The following query will return the list of inactive users in JIRA:

SELECT u.user_name,u.first_name,u.last_name,u.email_address,d.directory_name from cwd_user u join cwd_directory d on u.directory_id = d.id where u.active = 0;

The preceding query relies on another table called cwd_directory. This directory stores the user directory information, whereas whether the user is active or not is stored in the cwd_user table under the active table field.

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

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