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

Still need help?

The Atlassian Community is here for you.

Ask the community


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.  


The basics

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

The basic connection URL format is jdbc:sqlserver://<server>:<port>;database=<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:

    <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:

    <property name="hibernate.connection.url">jdbc:sqlserver://yourserver:1433;database=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:

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

  6. Save the file and restart Confluence. 

Additional steps for Confluence Data Center

If you're running Confluence Data Center 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:

    set DATABASE_URL="jdbc:sqlserver://yourserver:1433;database=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

    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


Last modified on Oct 30, 2017

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.