Migrate from the jTDS driver to the supported Microsoft SQL Server driver in Confluence 6.4 or later

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

The open source jTDS driver for Microsoft SQL Server will not be supported for use with Confluence beyond Confluence 6.5. This means you will need to switch to using the official Microsoft JDBC Driver for SQL Server, which is bundled with Confluence 6.4 and later.

When you start Confluence 6.6, Confluence will attempt to switch to the Microsoft JDBC Driver for SQL Server. If this process can't be completed, or if you want to switch to the new driver before upgrading to 6.6, you'll need to follow the steps in this guide to manually migrate to the supported driver.

Solution

The basics

The new driver class name is com.microsoft.sqlserver.jdbc.SQLServerDriver

The basic connection URL format is:

jdbc:sqlserver://<server>:<port>;databaseName=<databasename>.

See https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url in the Microsoft documentation for help constructing your connection URL.

If you use a JDBC connection

  1. Stop Confluence.

  2. Back up your home directory.

  3. Edit <home-directory>/confluence.cfg.xml

  4. Update the driver class name as follows:

    1 <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
  5. Update your connection URL to use the SQL format. Here's an example:

    1 <property name="hibernate.connection.url">jdbc:sqlserver://yourserver:1433;databaseName=confluence</property>
  6. Save the file and restart Confluence.

If you use a Datasource connection

  1. Stop Confluence.

  2. Back up your installation and home directories.

  3. Edit <install-directory>/conf/server.xml

  4. Update the driver class name as follows:

    1 driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  5. Update your connection URL to use the SQL format. Here's an example:

    1 url="jdbc:sqlserver://yourserver:1433;databaseName=confluence"
  6. Save the file and restart Confluence.

Additional steps for Confluence Data Center

If you're running Confluence Data Center, with a Possible Confluence and Synchrony Configurations (e.g. Synchrony is not managed by Confluence) you will also need to tell Synchrony to use the new driver.

For Confluence 6.5 or later, if you're using the start and stop scripts, follow these steps:

  1. Stop Confluence

  2. Stop Synchrony

  3. Back up your Synchrony home directory

  4. Edit start-synchrony.bat or start-synchrony.sh

  5. Update your database URL to use the SQL format. Here's an example:

    1 set DATABASE_URL="jdbc:sqlserver://yourserver:1433;databaseName=confluence"
  6. Update the path to the Microsoft JDBC driver (if you run Synchrony on a seperate server, you may need to copy the driver over from <install-directory>/confluence/WEB-INF/lib)

    1 set DATABASE_DRIVER_PATH=\path\to\mssql-jdbc-x.x.x.jar
  7. Save your script and restart Synchrony.

  8. Start Confluence and check that Confluence can connect to Synchrony and that you can edit pages.

For Confluence 6.4 the steps are much the same, except you will be updating your start Synchrony command to include the new format database URL and path to the Microsoft JDBC driver. See Configuring Synchrony for Data Center.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.