Change the schema name for Jira database tables

お困りですか?

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

コミュニティに質問

症状

There are times when an administrator might want to change the schema of their existing database tables.  This could be for organizational or "good practice" purposes.  Other times it may relate to bugs, for example:

JRA-25270 - 課題詳細を取得中... ステータス

Verification

This article only applies to Oracle and SQL Server database management systems.

ソリューション

Backup XML Restore

Restore XML backup into a brand new database where your db user uses a different schema (e.g. jiraschema).

  1. Backup your existing data via a backup XML: Backing Up Data
  2. Create the new schema in your database
  3. Define the new schema in dbconfig.xml: JIRA Home Directory
  4. Jira を再起動します。
  5. You should reach the setup wizard, at which point you can restore the Backup XML: Restoring Data

または

Alter existing Tables for new Schema in Microsoft SQL Server

データベースの変更を行う場合は 必ず事前にバックアップを取得してください。可能な場合はテスト サーバーで変更を試すことをおすすめします。

  1. Jira をシャットダウンします。
  2. Run the following SQL query in SQL Server:

    SELECT 'ALTER SCHEMA newschema TRANSFER ' + TABLE_SCHEMA + '.' + TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'oldschema'
    1. Replace newschema and oldschema with the actual names of your new and old schema.
    2. This essentially provides a list of SQL queries to help automate the ALTER SCHEMA function in SQL Server
  3. Copy the results into a new SQL script and run the queries.
  4. Define the new schema in dbconfig.xml: JIRA Home Directory
  5. Jira を再起動します。

 

最終更新日 2019 年 9 月 25 日

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

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