How to manage Jira Data Center license using database queries

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Please note that this article is only about updating the license key of Jira applications (Jira Core, Jira Software, Jira Service Management) in the database.

If you are trying to update the license key of 3rd party add-ons installed in the Jira application, please refer to the following article instead: How to update the license key of a third party add-on directly in the Jira Database

If for whatever reason the JIRA license key needs to be extracted from the database, it can be done with the following SQL:

1 SELECT * FROM productlicense;

This is tested on PostgreSQL and may need modifying for other DBMS such as Oracle or SQL Server. Please consult with your DBA for any syntax corrections which may need to be made.

For JIRA 7.0.4 and below:

1 2 3 4 5 SELECT propertyvalue AS license FROM propertytext pt JOIN propertyentry pe ON pt.id = pe.id WHERE property_key = 'License20';

ℹ️ Note that there is no license to product (ie. Core, Software, Service Management) relation mapping stored in the DB. Jira just stores the license as is and will decode it to apply to respective product

Solution

Updating the License

It is possible to update the license directly in the database however it is not recommended. This is because it can cause data integrity problems and may lead to data corruption. If you choose to do this please keep in mind we may be unable to provide support.

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Stop JIRA.

  2. Execute the following to locate the ID to modify:

    JIRA 7.0.5 and above

    1 SELECT * FROM productlicense;

    JIRA 7.0.4 and below

    1 2 3 4 5 SELECT pt.id FROM propertytext pt JOIN propertyentry pe ON pt.id = pe.id WHERE property_key = 'License20';
  3. Update the license with the following:

    JIRA 7.0.5 and above

    1 UPDATE productlicense SET license ='<license_string>' WHERE id= <id_from_step_2>;

    JIRA 7.0.4 and below

    1 UPDATE propertytext SET propertyvalue = '<license_string>' WHERE id = <id_from_step_2>;
  4. Start JIRA.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.