Jira アプリケーションの SQL Server 2014 への接続

These instructions will help you connect Jira to a Microsoft SQL Server 2014 database.

はじめる前に

1. SQL Server データベースを作成および構成する

When creating the database, remember your database name, user name, schema name, and port number, because you'll need them later to connect Jira to your database.

  1. Create a database for Jira (e.g. jiradb). 

    • 照合タイプでは、大文字と小文字が区別されないことに注意します。

      サポートされる照合タイプ...

      大文字と小文字およびアクセントを区別し、言語に依存しない照合順序タイプとして、SQL_Latin1_General_CP437_CI_AI および Latin1_General_CI_AI をサポートしています。お使いの SQL Server インストールの照合タイプの設定をデフォルトから変更していない場合、照合タイプの設定をご確認ください。

    • SQL Server は Unicode エンコード形式で文字を格納します。これで、文字エンコード問題を十分回避できます。

  2. Create a database user which Jira will connect as (e.g. jiradbuser). This user should not be the database owner, but should be in the db_owner role.

  3. Create an empty 'schema' in the database for the Jira tables  (e.g. jiraschema).

    詳細を読む...

    A 'schema' in SQL Server 2016 is a distinct namespace used to contain objects and is different from a traditional database schema. You are not required to create any of JIRA's tables, fields or relationships (Jira will create these objects in your empty schema when it starts for the first time). You can read more on SQL Server 2016 schemas in the relevant Microsoft documentation.

  4. 作成したデータベース ユーザーが、データベースに接続し、新しく作成したスキーマでテーブルを作成および更新できる権限を持っていることを確認します。

  5. SQL Server で TCP/IP が有効であり、適切なリスニング ポートが設定されていることを確認します。デフォルトの SQL Server インストールのユーザー ポート番号は 1433 です。

  6. SQL Server が適切な認証モードで稼働していることを確認します。

    詳細を読む...

    By default, SQL Server operates in 'Windows Authentication Mode'. However, if your user is not associated with a trusted SQL connection, i.e. 'Microsoft SQL Server, Error: 18452' is received during Jira startup, you will need to change the authentication mode to 'Mixed Authentication Mode'. Read the Microsoft documentation on authentication modes and changing the authentication mode to 'Mixed Authentication Mode'

  7. SET NOCOUNT オプションのチェックを外します。
    1. SQL Server Management Studio を開きます。
    2. [ツール] > [オプション] > [クエリ実行] > [SQL Server] > [詳細] に移動し、[SET NOCOUNT] チェック ボックスの選択を解除します。


    3. オブジェクト エクスプローラーでサーバーを右クリックし、[プロパティ] > [接続] > [デフォルト接続] に移動します。no count オプションをクリアします。

  8. 新規作成したデータベース上で右クリックして、[クエリ コンソール] にアクセスし、 “New Query” を選択します。次のコマンドを実行し、分離レベルを設定します。

    ALTER DATABASE THE-NEW-DATABASE-CREATED-FOR-JIRA SET READ_COMMITTED_SNAPSHOT ON

2. Configure Jira to connect to the database

There are two ways to configure your Jira server to connect to your SQL Server database.

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

The table shows the fields you'll need to fill out when connecting Jira to your database. You can also refer to them, and the sample dbconfig.xml file below, if you'd like to create or edit the dbconfig.xml file manually.

セットアップウィザード / 設定ツールdbconfig.xml説明
ホスト名

<url> タグに格納されます (下記例の太字部分): <url>jdbc:sqlserver://dbserver:1433;databaseName=jiradb</url>

SQL Server がインストールされたサーバーマシンのマシン名または IP アドレスです。
ポート

<url> タグに格納されます (下記例の太字部分): <url>jdbc:sqlserver://dbserver:1433;databaseName=jiradb</url>

SQL Server のサーバーがリスンする TCP/IP ポートです。このフィールドが空の場合、デフォルト ポートが使用されます。
データベース

<url> タグに格納されます (下記例の太字部分): <url>jdbc:sqlserver://dbserver:1433;databaseName=jiradb</url>

The name of your SQL Server database (into which Jira will save its data). You should have created this in Step 1 above.

ユーザ名

<username> タグに格納されます (下記例の太字部分):
<username> jiradbuser </username>

The user that Jira uses to connect to the SQL Server server. You should have created this in Step 1 above.

パスワード<password> タグに格納されます (下記例の太字部分):
<password> jiradbuser </password>
SQL Server サーバーが認証に使用するユーザーのパスワードです。
スキーマ<schema-name> タグ格納されます (下記例の太字部分):
<schema-name> dbo </schema-name>

SQL Server サーバーが使用するスキーマの名前です。上記 ステップ 1で作成済みのはずです。

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>jiraschema</schema-name>
<jdbc-datasource>
 <url>jdbc:sqlserver://serverName=dbserver;portNumber=1433;databaseName=jiradb</url>
  <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</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</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>


3. Jira を起動する

You should now have Jira configured to connect to your SQL Server database. The next step is to start it up!

Last modified on Mar 26, 2019

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

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