Connecting Jira applications to Azure SQL
These instructions will help you connect Jira Server or Jira Data Center to an Azure SQL database.
Before you begin
- If you're Migrating Jira applications to another server, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database, as described in Switching databases.
1. Create an Azure SQL database
Create an Azure SQL database. See Quickstart: Create a single database in Azure.
Requirements
- 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
andLatin1_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. Configure Jira to connect to the database
There are two ways to configure your Jira server to connect to your Azure SQL database.
Finding connection strings
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.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.
Database connection fields
The sections below describe the fields you'll need to fill out when connecting Jira to your database.
4. Schedule regular database maintenance tasks
Schedule a daily maintenance task for hot tables
Hot tables are the most active tables in your database. For example, propertyentry
, changeitem
, and changegroup
are large data tables that are used frequently and require regular updating of statistics.
To set up a daily maintenance task for hot tables, run the following command:
UPDATE STATISTICS <table.name>
Schedule a weekly maintenance task for the whole database
To set up a weekly maintenance task for the whole database, run the following command:
UPDATE STATISTICS <table.name> with fullscan
For large databases, updating statistics with fullscan
might take a long time to complete. To minimize the impact on your production environment, schedule this maintenance task for off-peak hours.
For more information on how to update database statistics, see the official Microsoft documentation.