Documentation for JIRA 5.2. Documentation for other versions of JIRA is available too.

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

(info) 注意:

  • If you are setting up a completely new JIRA installation, the JIRA Setup Wizard will configure a Oracle database connection for you.
  • Oracle 9i is no longer a supported database for use with JIRA and the 11.2.x drivers from Oracle do not support 9i.

1. Before You Begin

1.1 Are You Migrating JIRA to Another Server?

他のサーバーへの JIRA の移行 を実行する場合は、XML backup としてデータをエクスポートしてください。その後、 Switching databases で説明されているように、元のデータベースから新しいデータベースへデータを移行できます。

1.2 Shut Down JIRA

On this page:

2. Configure Oracle

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

    create user <user> identified by <user_pass> default tablespace <tablespace_name> quota unlimited on <tablespace_name>;
    
  3. ユーザーが次の権限を持つことを確認します :

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

3. Copy the Oracle JDBC Driver to Your Application Server (JIRA WAR Only)

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

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

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

  • We recommend that you use the 11.2.x versionof 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.

4. Configure Your JIRA Server to Connect to Your Oracle Database

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

(info) 注意:

4.1 Connecting JIRA to Oracle Using the JIRA Configuration Tool

(warning) The JIRA Configuration Tool is not available with JIRA WAR distributions.

(info) Please Note: You may need to set the JAVA_HOME environment variable to run the JIRA Configuration Tool. See Installing Java for details.

To connect JIRA to Oracle using the JIRA Configuration Tool:

  1. Click the Database tab.
  2. From the Database type drop-down choose Oracle.
    (info) The JIRA Configuration Tool will display your current database configuration settings if any are already set.
  3. Fill in the connection details for your Oracle database.
    • Hostname — The name or IP address of the machine that the Oracle server is installed on.
    • Port — The TCP/IP port that the Oracle server is listening on. The default port number for Oracle is '1521'.
    • SID — The Oracle 'System Identifier'. The default value for most Oracle servers is 'ORCL'. If you are using the Oracle Express Edition, this will be 'XE'.
    • Username — The user that JIRA uses to connect to the Oracle server.
    • Password — The user's password to authenticate with the Oracle server.
  4. After typing in your settings, click the Test Connection button to test the connection settings. The tool will attempt to connect to the database, and give a message with the results.
  5. Click Save to save your settings when you are done.
    (info) Please Note:
    • The JIRA Configuration Tool will save your database configuration to a dbconfig.xml file in your JIRA Home Directory.
    • If you had previously specified any additional custom settings while manually configuring JIRA with Oracle below (for example, adding the <connection-properties>SetBigStringTryClob=true</connection-properties> element to your dbconfig.xml file), these custom settings will be deleted upon clicking the 'Save' button and you will need to reinstate them manually.
    • JIRA must be restarted for your new settings to take effect.

Congratulations — you have finished! Proceed to 'Next Steps' below.

4.2 Connecting JIRA to Oracle Manually

  1. Edit the dbconfig.xml file at the root of your JIRA Home Directory.
    (info) If this file does not exist, create the file, copy and paste the example XML code below into this file and edit the pasted XML as required.

    注意:

    Ensure that the <database-type/> element's content specifies your type of database, as shown below. If you forget to do this and you start JIRA, your database tables may be created incorrectly. Refer to our Incorrect database type specified documentation if this happens to you.

    (warning) When editing your dbconfig.xml file, escape any '&' characters by adding 'amp;' to the end of each one.

    <?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>
      </jdbc-datasource>
    </jira-database-config>
    

    (info) 注意:

    • On a default Oracle server installation, your <url/> element's content might look similar to — jdbc:oracle:thin:@dbserver:1521:ORCL

    • For more information about the child elements of <jdbc-datasource/> beginning with pool in the dbconfig.xml file above, see Tuning Database Connections.
  2. Save your edited dbconfig.xml file (at the root of your JIRA Home Directory).
    (info) JIRA must be restarted for your new settings to take effect.

(minus) 注意:

  • 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.

5. 次のステップ

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

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

インストールに際して

JIRA and Oracle を参照してください。