How to manage Jira Data Center license using database queries

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

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


要約

何らかの理由でデータベースから Jira ライセンスを抽出する必要がある場合は次の SQL を利用できます。

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:

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

(info) DB 内では製品 (Core、Software、Service Management) とライセンスのリレーションが保管されているわけではない点にご注意ください。Jira でライセンスがそのまま格納され、それがデコードされて各製品に適用されます。


ソリューション

ライセンスの更新

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.

データベースの変更を行う場合は 必ず事前にバックアップを取得してください。可能な場合はテスト サーバーで変更を試すことをおすすめします。

  1. Jira を停止します。
  2. 次のクエリを実行して変更対象の ID を取得します。

    Jira 7.0.5 以前

    SELECT * FROM productlicense;

    Jira 7.0.4 以降

    SELECT pt.id 
    FROM   propertytext pt 
           JOIN propertyentry pe 
             ON pt.id = pe.id 
    WHERE  property_key = 'License20'; 
  3. ライセンスを次のように更新します。

    Jira 7.0.5 以前

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

    Jira 7.0.4 以降

    UPDATE propertytext SET propertyvalue = '<license_string>' WHERE id = <id_from_step_2>;
  4. Jira を起動します。


最終更新日: 2024 年 2 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.