How to Get and Update JIRA License String from the Database

Still need help?

The Atlassian Community is here for you.

Ask the community


This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications.

Purpose

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

SELECT propertyvalue AS license 
FROM   propertytext pt 
       JOIN propertyentry pe 
         ON pt.id = pe.id 
WHERE  property_key = 'License20'; 

This is tested on PostgreSQL and may need modifying for other DBMS such as Oracle or SQL Server.


For JIRA 7.0.5 and above:

SELECT * FROM productlicense;


Solution

Updating the License

The license can be updated as per Specifying your License Details. If this does not work, it is possible to do so with an update to 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 performing any modification to the database. If possible, try your modifications on a test server.

  1. Stop JIRA.
  2. Execute the following to locate the ID to modify:

    JIRA 7.0.4 and below

    SELECT pt.id 
    FROM   propertytext pt 
           JOIN propertyentry pe 
             ON pt.id = pe.id 
    WHERE  property_key = 'License20'; 

    JIRA 7.0.4 and above

    SELECT * FROM productlicense;
  3. Update the license with the following:

    JIRA 7.0.4 and below

    UPDATE propertytext SET propertyvalue = '<license_string>' WHERE id = <id_from_step_2>;

    JIRA 7.0.4 and above

    update productlicense set license ='<license_string>' WHERE id= <id_from_step_2>;
  4. Start JIRA.


Description The license can be updated as per Specifying your License Details. If this does not work, it is possible to do so with an update to the database however it is not recommended. 
Product Jira
Platform Server
Last modified on Oct 17, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.