JIRA アプリケーションの Oracle への接続

ここでは、JIRA を Oracle データベースに接続する方法を解説します。

はじめる前に

  • ご使用の Oracle のバージョンがサポートされていることを確認します。サポート対象プラットフォームを参照してください。
  • 以下の既知の問題を確認してください。
  • Oracle の Web サイトから、Oracle JDBC 12.2.0.1 ドライバをダウンロードします。このファイルは以降の手順で Jira インストール ディレクトリにコピーする必要があります。
  • 別のサーバーに JIRA を移行する場合は、XML backup としてデータのエクスポートを作成します。その後、「データベースの切り替え」で説明されているように、元のデータベースから新しいデータベースへデータを移行できます。
  • セットアップウィザードを実行中でなければ、開始する前に JIRA をシャットダウンします。

On this page:

1. Oracle の設定

  1. JIRA が使用できるデータベース インスタンスがあることを確認します。(新規作成、または、既存インスタンスを使用)
  2. Within that database instance, create a user which JIRA will connect as (e.g. jiradbuser).
    Remember this database user name
    , as it will be used to configure JIRA's connection to this database in subsequent steps.

    create user <user> identified by <user_pass> default tablespace <tablespace_name> quota unlimited on <tablespace_name>;
    

    注意:

    • Oracle でユーザーを作成すると、Oracle は自動的に「スキーマ」を作成します。

    • ユーザーの作成時に、表オブジェクト用の表領域を指定する必要があります。

  3. ユーザーが次の権限を持つことを確認します。

    grant connect to <user>;
    grant create table to <user>;
    grant create sequence to <user>;
    grant create trigger to <user>;

    上記に示された権限と完全に一致する権限をユーザーが付与されていることが非常に重要です。JIRA ではこれらの権限のみ必要です。適用される権限に過不足がある場合、一部の JIRA 機能が正しく動作しない可能性があります。

    簡潔に言うと、JIRA の機能が期待どおり動作するように、ユーザーには特定の権限を付与し、ロールは割り当てないようにすることをお勧めします。

    For example, if you grant the RESOURCE role to a user, and the RESOURCE role grants the SELECT ANY TABLE privilege, then JIRA functions may not work as expected.

    したがって、上記に示した権限をそのままユーザーに付与することをお勧めします。

  4. データベースに設定された使用文字エンコード形式が JIRA と同じものであることを確認します。推奨エンコード形式は AL32UTF8 (Oracle で Unicode UTF-8 に相当するもの) です。

2. Oracle JDBC ドライバのダウンロード

Jira では Oracle JDBC 12.2.0.1 ドライバが必要です。Oracle の Web サイトからダウンロードし、インストール ディレクトリにコピーします。

  1. Oracle JDBC ドライバをダウンロードします

  2. Copy the downloaded ojdbc8.jar file to the lib/ directory in the JIRA installation directory. 

3. Oracle データベースに接続するための JIRA サーバーの設定

Oracle データベースに接続するために JIRA サーバーを設定する方法は2つあります。

  • Using the JIRA setup wizard — Use this method if you have just installed JIRA, and are setting it up for the first time. Your settings will be saved to the dbconfig.xml file in your JIRA home directory.
  • Using the JIRA configuration tool — Use this method if you have an existing JIRA instance. Your settings will be saved to the dbconfig.xml file in your JIRA home directory.

各設定手法の手順説明

JIRA セットアップ ウィザード

ブラウザから初めて JIRA にアクセスすると、JIRA セットアップウィザード が表示されます。

  1. 最初の画面 の “Configure Language and Database” で、 “Database Connection” に My own database を選択します。
  2. データベース タイプOracle に設定します。
  3. 下記の データベース接続関連フィールド を参照し、フィールド入力を行います。
  4. 接続をテストし、保存します。

JIRA 設定ツール

  1. 次のように JIRA 設定ツールを実行します。
  2. [Database] タブを選択し、”Database type” に ”Oracle” を設定します。
  3. 下記の データベース接続関連フィールド を参照し、フィールド入力を行います。
  4. Test your connection and save. Any custom settings specified while manually configuring JIRA with Oracle (e.g., adding the <connection-properties>SetBigStringTryClob=true</connection-properties>) will be deleted. You will need to reinstate them manually.
  5. Jira を再起動します。

データベース接続フィールド

セットアップウィザード / 設定ツールdbconfig.xml説明
ホスト名

<url> タグに配置されます (下記の例の太字部分):<url>jdbc:oracle:thin:@dbserver:1521/ORCL</url>

Oracle サーバーがインストールされたサーバー マシンのマシン名または IP アドレスです。
ポート

<url> タグに配置されます (下記の例の太字部分):
<url>jdbc:oracle:thin:@dbserver:1521/ORCL</url>

Oracle サーバーがリッスンする TCP/IP ポートです。Oracle に設定されたデフォルト ポート番号は “1521” です。
SID

<url> タグに配置されます (下記の例の太字部分):<url>jdbc:oracle:thin:@dbserver:1521/ORCL</url>

Oracle の「システム識別子」です。多くの Oracle サーバーに対するこのデフォルト値は、”ORCL” です。Oracle Express Edition を使用している場合は、”XE” です。
ユーザ名

<username> タグに配置されます (下記の例の太字部分):
<username>jiradbuser</username>

JIRA が Oracle サーバーに接続するために使用するユーザー。上記 ステップ 1で作成済みのはずです。
パスワード<password> タグに配置されます (下記の例の太字部分):
<password>jiradbuser</password>
Oracle サーバーが認証に使用するユーザーのパスワードです。

dbconfig.xml ファイルのサンプル

上記の dbconfig.xml ファイルに含まれる、pool で始まる <jdbc-datasource/> の子要素の詳細については、「データベース接続のチューニング」を参照してください。

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>oracle10g</database-type>
  <jdbc-datasource>
    <url>jdbc:oracle:thin:@dbserver:1521/ORCL</url>
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <username>jiradbuser</username>
    <password>password</password>
    <pool-min-size>20</pool-min-size>
    <pool-max-size>20</pool-max-size>
    <pool-max-wait>30000</pool-max-wait>
    <pool-max-idle>20</pool-max-idle>
    <pool-remove-abandoned>true</pool-remove-abandoned>
    <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
 
    <validation-query>select 1 from dual</validation-query>
    <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
    <time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
  
    <pool-test-while-idle>true</pool-test-while-idle>
    <pool-test-on-borrow>false</pool-test-on-borrow>
  </jdbc-datasource>
</jira-database-config>


3. JIRA の起動

ここまでで、Oracle データベースに接続するための JIRA の設定が完了したはずです。これで、起動できます!

(tick)  以上で、Oracle データベースへの JIRA の接続は完了です。

既知の問題

  • If you start experiencing problems when dealing with custom workflows or working with issues that have long descriptions, comments or custom field values, try adding the element <connection-properties>SetBigStringTryClob=true</connection-properties> as a child of the </jdbc-datasource> element in your dbconfig.xml file. This connection property may solve these problems. You'll need to restart JIRA afterwards.
最終更新日 2018 年 4 月 15 日

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

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