Connecting JIRA applications to Azure SQL

These instructions will help you connect JIRA Server or JIRA Data Center to an Azure SQL database.

はじめる前に

1. Azure SQL データベースを作成する

Azure SQL データベースを作成します。「クイックスタート: Azure で単一のデータベースを作成する」を参照してください。

要件

  • Collation: When creating the database, make sure to set the right collation in Additional settings, as you won't be able to change it later. Collation types supported by JIRA are SQL_Latin1_General_CP437_CI_AI and Latin1_General_CI_AI.


2. Allow JIRA to connect to the database

You need to add the IP address of your JIRA server to the database's firewall rules to allow JIRA to connect to your Azure SQL database. See Azure SQL database firewall rules.


3. Jira を構成してデータベースに接続する

There are two ways to configure your JIRA server to connect to your Azure SQL database.

tip/resting Created with Sketch.

接続文字列を見つける

When connecting JIRA to the database, you’ll need to provide connection details, such as hostname, port number, and database name. You can find them in the Azure portal by opening your deployed database and going to Connection strings.


  • 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 application home directory.

    手順について

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

    1. 最初の画面 の “Configure Language and Database” で、 “Database Connection” に My own database を選択します。
    2. [Database Type] を [Microsoft SQL Server] に設定します。
    3. 下記の データベース接続関連フィールド を参照し、フィールド入力を行います。
    4. 接続をテストし、保存します。
  • 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 application home directory.

    手順について
    1. 次のように JIRA 設定ツールを実行します。
    2. [Database] タブに進み、[Database type] を [Microsoft SQL Server] に設定します。
    3. 下記の データベース接続関連フィールド を参照し、フィールド入力を行います。
    4. 接続をテストし、保存します。
    5. Jira を再起動します。 

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

The sections below describe the fields you'll need to fill out when connecting JIRA to your database. 


セットアップ ウィザード/設定ツールの場合 ...
フィールド説明 / 例
ホスト名

Azure SQL サーバーの名前または IP アドレス。 

例: sqlserver.database.windows.net

ポート

Azure SQL サーバーがリッスンしている TCP/IP ポート。このフィールドが空の場合、デフォルト ポートが使用されます。

既定: 1433

データベース

The name of your Azure SQL database (into which JIRA will save its data).

例: jiradb

ユーザ名

The user that JIRA uses to connect to the SQL Server server.

例: jiradbuser@sqlserver

パスワードAzure SQL サーバーとの認証に利用するユーザーのパスワード。
スキーマ

Azure SQL データベースが使用するスキーマ名。 

既定: dbo

dbconfig.xml の場合...
フィールド説明 / 例
ホスト名

Azure SQL サーバーの名前または IP アドレス。 

-

<url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net;

portNumber=1433;databaseName=jiradb</url>

ポート

Azure SQL サーバーがリッスンしている TCP/IP ポート。このフィールドが空の場合、デフォルト ポートが使用されます。

-

<url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net;

portNumber=1433;databaseName=jiradb</url>


データベース

The name of your Azure SQL database (into which JIRA will save its data).

-

<url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net;

portNumber=1433;databaseName=jiradb</url>

ユーザ名

The user that JIRA uses to connect to the SQL Server server.

-

<username>jiradbuser</username>

パスワード

Azure SQL サーバーとの認証に利用するユーザーのパスワード。

-

<password>yourpassword</password>

スキーマ

Azure SQL データベースが使用するスキーマ名。

-

<schema-name> dbo </schema-name>

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

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

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>mssql</database-type>
  <schema-name>dbo</schema-name>
  <jdbc-datasource>
    <url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net;portNumber=1433;databaseName=jiradb</url>
    <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
    <username>adminsql@sqlserver</username>
    <password>T3ddybear</password>
    <pool-min-size>20</pool-min-size>
    <pool-max-size>20</pool-max-size>
    <pool-max-wait>30000</pool-max-wait>
    <validation-query>select 1</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-max-idle>20</pool-max-idle>
    <pool-remove-abandoned>true</pool-remove-abandoned>
    <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
    <pool-test-on-borrow>false</pool-test-on-borrow>
    <pool-test-while-idle>true</pool-test-while-idle>
  </jdbc-datasource>
</jira-database-config>
最終更新日 2019 年 9 月 8 日

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

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