People who are upgrading from pre-JIRA 3.6.x to post-3.7, and cannot use the recommended 'XML backup/restore' upgrade method because it would take too long.
In general, there are two ways to upgrade JIRA's database, both of which are described in the Upgrading JIRA document:
XML backup/restore (recommended) - doing a full XML export and import into the new database.
Connect JIRA to a copy of your old database - connecting the new JIRA to the old database, and letting it automatically upgrade the database tables.
In 3.7.x, the 'Connect JIRA to a copy of your old database' method will not work. If you point JIRA 3.7.x to an older database, JIRA will print a warning and refuse to do anything. This is because a large number of database schema changes were made between 3.6 and 3.7 (see JIRA 3.7 Database Schema Changes) and these changes are too great for JIRA's database engine to upgrade automatically.
So, the vast majority of users should follow the XML backup/restore method described in the Upgrading JIRA document.
However, there are a handful of users with large installations, for which a full export/import is impractical as it takes a relatively long time. These users may need to use the 'Connect JIRA to a copy of your old database' method — This page is intended for these users. We have provided SQL scripts for each database, which will make the required changes to a 3.6.x database so it can be upgraded without a full export/import.
These scripts will only work on JIRA 3.6.x databases (they refer to a table only added in 3.6). If you are upgrading from an earlier release, please:
Back-up your database, and create a copy to be upgraded to 3.7.
Configure it to point to your 3.7 copy of the database
(optionally) Edit atlassian-jira/WEB-INF/classes/jira-application.properties and set jira.autoexport=false to speed up the process.
Start JIRA Standalone. By watching the logs (atlassian-jira.log or logs/catalina.out, you will see JIRA automatically upgrading tables to the 3.6.x format.
Proceed with the instructions below.
If you are using HSQLDB with JIRA, you must follow the 'XML backup/restore' instructions in the Upgrading JIRA guide, as simply copying the .script file will not work. The format of the .script file has changed between the HSQLDB versions, and therefore, copying the .script file will result in the following error on startup.
DB2 upgrade notes
Shutdown your JIRA instance
Perform a backup of your DB2 database: db2 backup database sample to /home/db2/backups
Download the following script db2_3.7_migration.ddl and modify the connect statement within the file
Execute the script using the following command: db2 +c -t -v -f db2_3.7_migration.ddl
If you see errors like:
insert into SCHEMEISSUESECURITIES (select ID, SCHEME, SECURITY, TYPE, PARAMETER from TMP_SCHEMEISSUESECURITIES)
SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table. SQLSTATE=02000
This is OK, it simply means that the inner SQL query did not return any data to be inserted into the new temporary table. This can occur if you are not using certain features in JIRA.
Point your new instalation of JIRA 3.7 at your DB2 database and watch for any errors during the statup sequence.
If you see any other errors please contact support for further assistance.
PostgreSQL 8+ upgrade notes
Shutdown your JIRA instance
Perform a backup of your PostgreSQL database pg_dump -ddatabase name>backup filename.sql
for example pg_dump -d jiradb > jiradb_365_14112006.sql
Connect to SQL*Plus and execute the following script:
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 19 12:56:11 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> @/home/oracle/oracle_3.7_migration.sql
If you see any errors please contact support for further assistance.
Point your new instalation of JIRA 3.7 at your DB2 database and watch for any errors during the statup sequence.
Microsoft SQL Server upgrade notes
Shutdown your JIRA instance
Perform a backup of your SQL Server database: osql -Uusername-Ppassword-Q "BACKUP DATABASEdb_nameTO DISK =backup_path_and_filename"
for example osql -U sa -P secret -Q "BACKUP DATABASEjiradbTO DISK = 'C:\MyBackup.dat'"
Execute the script: osql -Uusername-Ppassword-ddb_name-i mssql_3.7_migration.sql
for example osql -U sa -P secret -d jiradb -i sqlserver_3.7_migration.sql
If everything goes well the following should be displyed
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'NOTIF_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'NOTIF_PARAMETER'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'SEVER_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'EVENT_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'PERM_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'PERM_PARAMETER'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'LAYOUT_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'SEC_TYPE'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'SEC_PARAMETER'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The COLUMN was renamed to 'POSITIONSEQ'.
Caution: Changing any part of an object name could break scripts and stored procedures.
The object was renamed to 'projectversion'.
Point your new instalation of JIRA 3.7 at your SQL Server database and watch for any errors during the statup sequence.
Sybase upgrade notes
Shutdown your JIRA instance
Perform a backup of your SQL Server database
for example using isql tool
1> dump database db_name to "backup_path_and_filename"
2> go
Execute the script: osql -Uusername-Ppassword-Ddb_name-i sybase_3.7_migration.sql
for example osql -U sa -P -D jiradb -i sybase_3.7_migration.sql
If everything goes well the following should be displyed
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Column name has been changed.
(return status = 0)
Object name has been changed.
(return status = 0)
Point your new instalation of JIRA 3.7 at your Sybase database and watch for any errors during the statup sequence.
MySQL upgrade notes
Shutdown your JIRA instance
Perform a backup of your MySQL database: mysqldump --optdb_name>db_name.sql
for example mysqldump --opt jiradb > jiradb_before37.sql