How to Connect JIRA to ORACLE Using Service Name

お困りですか?

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

コミュニティに質問

このページの内容は、Jira アプリケーションでサポートされていないプラットフォームに関連しています。したがって、アトラシアンは、そのためのサポートの提供を保証できません 。この資料は情報提供のみを目的としているため、お客様自身の責任でご使用ください。

説明

In many configurations it is needed to connect using the Service names configured in TNSNAMES.ora file to connect JIRA to ORACLE. The Tnsnames.ora is the file which can be used to store database connect parameters of one or more Oracle servers and databases. It can also be used to configure database connection load balancing and/or failover.

This is how this file usually looks like:

<DATABASENAME>.WORLD =
  (DESCRIPTION =
   (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON)
    (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER01)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER02)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER03)(PORT = 1521))
   )
    (CONNECT_DATA =
      (SERVICE_NAME = <SERVICENAME>)
    )
  )

設定方法

  1. Edit the setenv.sh (for Linux) or seten.bat (for Windows) and add this property at JVM_SUPPORT_RECOMMENDED_ARGS:

    -Doracle.net.tns_admin=/path_to_file

    (info) Where /path_to_file points to the folder where this file is located, not the file itself.

  2. Edit the dbconfig.xml file and set the JDBC url using this format: 

    jdbc:oracle:thin:@DATABASENAME.WORLD

    A sample dbconfig.xml is given below:

     <?xml version="1.0" encoding="UTF-8"?>
    <jira-database-config>
                <name>TEST_JIRA</name>
                <delegator-name>default</delegator-name>
                <database-type>oracle10g</database-type>
                <jdbc-datasource>
                            <url>jdbc:oracle:thin:@//Server:Port/Service_NAME</url>
                            <driver-class>oracle.jdbc.OracleDriver</driver-class>
                            <username>USERNAME</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>
                </jdbc-datasource>
    </jira-database-config>
Last modified on Mar 30, 2016

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

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