Connecting Confluence applications to Azure SQL
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
These instructions will help you connect Confluence Server or Confluence Data Center to an Azure SQL database.
Solution
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 Confluence is SQL_Latin1_General_CP1_CS_AS (case sensitive).
2. Allow Confluence to connect to the database
You need to add the IP address of your Confluence server to the database's firewall rules to allow Confluence to connect to your Azure SQL database. See Azure SQL database firewall rules.
3. Configure Confluence to connect to the database
Finding connection strings
When connecting Confluence 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 Confluence setup wizard —Use this method if you have just installed Confluence and are setting it up for the first time. Your settings will be saved to a file in your Confluence application home directory.
The Confluence setup wizard will display when you access Confluence for the first time in your browser.
In the first screen, set Database Connection to My own database.
Set Database Type to Microsoft SQL Server.
Fill out the fields, as described in the Database connection fields section below.
Test your connection and save.
Database connection fields
The sections below describe the fields you'll need to fill out when connecting Confluence to your database.
In Setup Wizard/Configuration Tool
Field | Description / Example |
---|---|
Hostname | The name or IP address of the Azure SQL server. Example: sqlserver.database.windows.net |
Port | The TCP/IP port that the Azure SQL server is listening on. You can leave this blank to use the default port. Default: 1433 |
Database | The name of your Azure SQL database (into which Confluence will save its data). Example: Confluencedb |
Username | The user that Confluence uses to connect to the SQL Server server. Example: Confluencedbuser@sqlserver |
Password | The user's password — used to authenticate with the Azure SQL server. |
Schema | The name of the schema that your Azure SQL database uses. Default: dbo |
In confluence.cfg.xml
Field | Description / Example |
---|---|
Hostname | The name or IP address of the Azure SQL server. - <url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net; portNumber=1433;databaseName=Confluencedb</url> |
Port | The TCP/IP port that the Azure SQL server is listening on. You can leave this blank to use the default port. - <url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net; portNumber=1433;databaseName=Confluencedb</url> |
Database | The name of your Azure SQL database (into which Confluence will save its data). - <url>jdbc:sqlserver://;serverName=sqlserver.database.windows.net; portNumber=1433;databaseName=Confluencedb</url> |
Username | The user that Confluence uses to connect to the SQL Server server. - <username>Confluencedbuser</username> |
Password | The user's password — used to authenticate with the Azure SQL server. - <password>yourpassword</password> |
Schema | The name of the schema that your Azure SQL database uses. - <schema-name> dbo </schema-name> |
Was this helpful?