JIRA の HSQLDB への接続

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

はじめる前に

HSQLDB を本番環境に使わないでください

JIRA ships with a built-in HSQLDB (HyperSQL DataBase) database. While this database is suitable for evaluation purposes, it is susceptible to data loss during system crashes. Hence, for production environments we strongly recommend that you configure JIRA to use an external database. See our list of supported databases on Supported Platforms.

1. HSQLDB ドライバーをアプリケーションサーバーへコピーします (JIRA WAR 限定)

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

  1. Download the HSQLDB JDBC driver — hsqldb-1.8.0.5.jar for JIRA 3.7+, or hsqldb-1.7.1-patched.jar for JIRA 3.6.5 and earlier. We strongly recommend upgrading to 3.7 if you wish to use hsqldb, as hsqldb 1.7.x is prone to data corruption.
  2. Add the HSQLDB JDBC driver jar to the lib/ directory.

4. HSQL データベースに接続するように JIRA サーバーを設定します

ご使用の HSQL データベースに接続するために 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. 最初の画面の '言語とデータベースの設定' で、 データベース接続 JIRA 同梱 データベース に設定します。
  2. セットアップ ウィザードの次の手順へ進みます。セットアップ ウィザードが自動的に同梱 HSQL データベースを設定してくれます。

JIRA 設定ツール

  1. 次のように JIRA 設定ツールを実行します。
  2. データベース タブへ進み、データベースの種類 HSQL に設定します。
  3. Test your connection and save. The JIRA configuration tool will configure your bundled HSQL database automatically.
    This tool adds the following elements to the dbconfig.xml, which are normally required when running JIRA with HSQLDB:
    <min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
    <time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
  4. 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. hsql. 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説明
ホスト名

Located in the <url> tag (bold text in example below):
<url>jdbc:hsqldb:C:\Data\JIRA 5.2.7/database/jiradb</url>

(JIRA のデータ保存先である) HSQL データベースの名前。
データベース

<url> タグに配置されます (下記の例の太字部分):
<url>jdbc:hsqldb:C:\Data\JIRA 5.2.7/database/jiradb</url>

HSQL サーバーがインストールされたマシンの名前または IP アドレス。 
ユーザ名

Located in the <username> tag (see bold text in example below):
<username>sa</username>

The user that JIRA uses to connect to the HSQL server. You should have created this in Step 1 above.
パスワードLocated in the <password> tag (see bold text in example below):
<password></password>
ユーザーのパスワード — HSQL サーバーの認証に使われます。
スキーマLocated in the <schema-name> tag (see bold text in example below):
<schema-name>PUBLIC</schema-name>

HSQL デーベースが使用するスキーマの名前。

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>hsql</database-type>
  <schema-name>PUBLIC</schema-name>
  <jdbc-datasource>
    <url>jdbc:hsqldb:C:\Data\JIRA 5.2.7/database/jiradb</url>
    <driver-class>org.hsqldb.jdbcDriver</driver-class>
    <username>sa</username>
    <password></password>
    <pool-min-size>20</pool-min-size>
    <pool-max-size>20</pool-max-size>
    <pool-max-wait>30000</pool-max-wait>
    <min-evictable-idle-time-millis>4000</min-evictable-idle-time-millis>
    <time-between-eviction-runs-millis>5000</time-between-eviction-runs-millis>
    <pool-max-idle>20</pool-max-idle>
    <pool-remove-abandoned>true</pool-remove-abandoned>
    <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
  </jdbc-datasource>
</jira-database-config>

4. JIRA を起動する

以上で、JIRA を HSQL データベースに 接続する設定ができたはずです。では、起動してみましょう!

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

その他の注意事項

 

最終更新日: 2014 年 12 月 29 日

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

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