Use this guide in conjunction with the more general Database Setup Guide for Any Database. These instructions add some reference notes specific to SQL Server.

  1. Review Known Issues For SQL Server

  2. Identify Character Encoding
    To identify which character encoding to use, check the encoding used by your application server and Confluence now. All three must use compatible encoding. For example, the default SQL Server encoding of USC-2 is compatible with UTF-8.

  3. Create Database
    As an SQL administrator, create a new database. If you set your application server and Confluence to use an encoding incompatible with USC-2, specify that character encoding for the database.

  4. Create SQL User Account
    As an SQL administrator, create a new user account for Confluence. Provide full create, read and write permissions for the table. Note that Confluence must be able to create its own schema.

  5. Install Database Drivers
    SQL Server users are strongly recommended to install the jTDS JDBC drivers.
    1. If using direct JDBC connection, copy the driver file jtds-<version>.jar into your standalone's <confluence install>/confluence/WEB-INF/lib directory.
    2. If you are configuring a datasource to connect to your MS SQL server database, you will need to place the jar file in <confluence install>/lib (for Confluence 2.10 onwards) or <confluence install>/common/lib (for earlier versions). You may find this page helpful: http://jtds.sourceforge.net/faq.html

  6. Start Confluence and visit the home URL (eg http://localhost:8080) to start the Confluence Setup Wizard and select a Custom Install, insert the relevant connection information.

  7. When prompted for a driver class name in the database setup step enter:
    net.sourceforge.jtds.jdbc.Driver
    
  8. When prompted for the jdbc url, the format to use is:
    jdbc:jtds:sqlserver://<server>:<port>/<database>