How to connect MSSQL as DataSource in Bamboo 6.x

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

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:

    <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

    <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=""/>

    <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


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

Last modified on May 24, 2018

Was this helpful?

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