How to connect MSSQL as DataSource in Bamboo 6.x

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

When replacing database connection with DataSource

Solution

  1. Stop Bamboo

  2. Backup <bamboo-home>/bamboo.cfg.xml

  3. Open up <bamboo-home>/bamboo.cfg.xml and replace:

    1 2 3 4 5 6 <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.connection.password">yourStrong123Password</property> <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=bamboo610</property> <property name="hibernate.connection.username">sa</property> <property name="hibernate.default_schema">dbo</property> <property name="hibernate.dialect">com.atlassian.bamboo.hibernate.SQLServerIntlDialect</property>

    with

    1 2 3 <property name="hibernate.connection.datasource">java:comp/env/jdbc/bambooDB</property> <property name="hibernate.default_schema">dbo</property> <property name="hibernate.dialect">com.atlassian.bamboo.hibernate.SQLServerIntlDialect</property>
  4. Open up <bamboo-install>/conf/server.xml and append just after <Manager pathname=""/>

    1 2 3 4 5 6 7 8 9 10 11 12 <Resource name="jdbc/bambooDB" auth="Container" type="javax.sql.DataSource" username="sa" password="yourStrong123Password" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;DatabaseName=bamboo610" maxTotal="100" maxIdle="10" maxWaitMillis="30000" validationQuery="Select 1" />
  5. Start Bamboo

ℹ️ The property <property name="hiberbate.default_schema">dbo</property> relates to https://jira.atlassian.com/browse/BAM-18610

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.