MS SQL Server

Connecting Crowd to a Database

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Supported Versions

Crowd supports the versions of MS SQL Server listed on the Supported Platforms page.

When you run the Crowd Setup Wizard, you will be asked to choose a database and provide configuration settings for that database. It will make things easier if you have created the database and deployed the database driver before you start the Setup Wizard.

Follow the instructions below to set up MS SQL Server for Crowd.

1. Configure SQL Server

  1. Create a database user which Crowd will connect as (e.g. crowduser).

    In SQL Server, the database user (crowduser above) should not be the database owner, but should be in the db_owner role.
    Additionally, you should create the database with case sensitive collation.

  2. Create a database for Crowd to store data in (e.g. crowddb).
  3. Ensure that the user has permission to connect to the database, and create and populate tables
  4. Ensure that the new database was set to use Read Committed with Row Versioning as its isolation level.
    You can apply the new isolation by executing the following query:

    ALTER DATABASE <database name>
       SET READ_COMMITTED_SNAPSHOT ON
       WITH ROLLBACK IMMEDIATE;
    

    To verify the changes, use this query which should result in '1':

    SELECT sd.is_read_committed_snapshot_on
    FROM sys.databases AS sd
    WHERE sd.[name] = '<database name>';
    

2. Copy the SQL Server Driver to your Application Server

This step is only required if you have downloaded the WAR distribution of Crowd.

 

  1. Download the SQL Server JDBC driver from JTDS (recommended), or I-net software(commercial).

    Microsoft have their own JDBC driver but we strongly recommend avoiding it after our JIRA customers have reported various connection errors (JRA-5760, JRA-6872), workflow problems (JRA-8443) and Chinese character problems (JRA-5054).

  2. Add the SQL Server JDBC driver JAR (jtds-[version].jar) to the following directory:
    • For Crowd distribution:
      • Crowd 2.0.2 or later: {CROWD_INSTALL}/apache-tomcat/lib/.
      • Crowd 2.0.1 or earlier: {CROWD_INSTALL}/apache-tomcat/common/lib/.
    • For Crowd WAR distribution, copy the driver JAR to your application server. For example, on Tomcat:
      • Tomcat 5.5.x: common/lib/.
      • Tomcat 6.x: lib/.

Next Steps

Complete the Crowd installation, then start Crowd and run the Setup Wizard as described in the Installation Guide.

Configuring Unicode Support in MS SQL Server

To configure Crowd to support Unicode in MS SQL Server 2005 and 2008, enter the following in the 'Hibernate Dialect' field on the Crowd Setup Wizard's Database Configuration screen:
com.atlassian.crowd.util.persistence.hibernate.SQLServerIntlDialect

RELATED TOPICS

Last modified on May 22, 2017

Was this helpful?

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