JIRA の Oracle への接続

These instructions will help you connect JIRA to an Oracle database.

はじめる前に

  • Check whether your version of Oracle is supported. See Supported Platforms.
  • If you are Migrating JIRA to Another Server, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database, as described in Switching databases.
  • セットアップ ウィザードを実行中でなければ、はじめる前に JIRA をシャットダウンしてください。

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 WAR 限定)

(warning) Skip this step if you installed a 'Recommended' distribution of JIRA, which includes the Oracle JDBC driver. The JIRA WAR distribution does not include this driver.

  1. Download the Oracle JDBC driver (from Oracle's site).
  2. Add the appropriate Oracle JDBC driver jar (ojdbc6.jar for JDK 1.6) to the lib/ directory.

Oracle JDBC ドライバーのバージョンの多くは JIRA で使用できない、または、本質的に不安定なものです。Oracle ドライバーには次のような既知の問題があります :

  • We recommend that you use the 11.2.x version of the driver for all versions of Oracle (it is backwards compatible). Many other versions of the driver have been noted to have problems, such as:
    • Version 10.2.0.3.0 of the 10g Release 2 JDBC driver has been noted to produce occurrences of error ORA-01461. The Oracle Support site has further details on this Oracle server issue, although you will need an Oracle support account to access this site.
    • Oracle 10g Release 2 JDBC ドライバーのバージョン10.2.0.1.0 は、一部のデータベースを動作停止させます。
    • The 10g Release 1 JDBC driver (10.1.0.4) does not hang, but throws ArrayIndexOutOfBoundsExceptions.
  • 注意 : JDK 1.6 は、JIRA 6.0 以降の JIRA ではサポートしていません。しかし、JDK 1.6 対応 Oracle JDBC ドライバーは JDK 1.7 で使用できるはずです。

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

Oracle データベースへ接続するための JIRA サーバーの設定方法は 3 つあります :

  • Using the JIRA setup wizard (not applicable to JIRA WAR) — 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 (not applicable to JIRA WAR) — 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.
  • Manually — Only use this method if you have a JIRA WAR instance or you have a console-only connection to your JIRA server. You will be required to manually update the dbconfig.xml file in your JIRA Home Directory.

各設定手法の手順説明

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

ブラウザから初めて JIRA にアクセスすると、JIRA setup wizard が表示されます。

  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 を再起動します。

手動

  1. Locate the dbconfig.xml file at the root of your JIRA Home Directory.
    • If this file does not exist, create the file, copy and paste the example XML code (shown below) into this file.
  2. Update the file, as described in the Database connection fields section below. Escape any '&' characters by adding 'amp;' to the end of each one.
    • Note, the <database-type/> element must specify your type of database, e.g. oracle10g. If you forget to do this and you start JIRA, your database tables may be created incorrectly. See Incorrect database type specified if this happens to you.
  3. ファイルを保存し、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 ファイルのサンプル

For more information about the child elements of <jdbc-datasource/> beginning with pool in the dbconfig.xml file above, see Tuning Database Connections.

<?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>

 

4. JIRA を起動する

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

  • JIRA の『推奨』ディストリビューションを使用している場合は、起動後、エラーがないかどうかログを観察します。
  • JIRA WAR ディストリビューションを使用している場合は、アプリケーションサーバーでウェブアプリケーションを再構築・再展開します。

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

インストールに際して

Please see JIRA and Oracle.

既知の問題およびトラブルシューティング

  • 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. Adding this connection property may overcome these problems. Be aware that you will need to restart JIRA for this setting to take effect.
最終更新日 2016 年 4 月 1 日

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

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