These instructions will help you connect Bamboo to a Microsoft SQL Server 2005 or a Microsoft SQL Server 2008 database.
(Microsoft SQL Server 2000 is not a supported database for use with Bamboo.)

(info) Express Editions: SQL Server Express 2005 and 2008 are not recommended databases due to CPU, memory and database size limitations (please see these pages for full details: SQL Server Express 2005 feature comparison, SQL Server Express 2008 feature comparison). However, the instructions below will allow you to connect Bamboo to SQL Server Express 2005/2008.

(info) Please note, the JDBC driver for SQL Server 2005/2008 (JTDS 1.2.2) is bundled with Bamboo. You do not have to download and install the driver.

On this page:

Related pages:

1. Configuring SQL Server

Before you connect Bamboo to a SQL Server, you need to configure the SQL Server appropriately.

2. Creating Your Database

After configuring the SQL Server, you need to create the SQL database.

3. Connecting Bamboo to SQL Server

Bamboo provides two ways to connect to a Microsoft SQL Server database — using JDBC or using a datasource. JDBC is generally simpler and is the recommended method.

(info) If you are planning to support Unicode in Bamboo please enable unicode settings for SQL Server

Connecting using JBDC

To connect Bamboo to a Microsoft SQL Server database, using JDBC:

  1. Run the Setup Wizard and choose the Custom Installation method.
  2. On the Choose a Database Configuration page, choose External Database > Microsoft SQL Server 2005/2008 and click Continue. The 'Database Configuration' page will appear.
  3. Ensure that Direct JDBC connection has been selected and complete the following fields (as shown in the screenshot below):

    SettingDescription
    Driver Class NameType net.sourceforge.jtds.jdbc.Driver (if different from the default)
    Database URLThe URL where Bamboo will access your database, e.g. jdbc:jtds:sqlserver://localhost:1433/<database>.
    If you are connecting to a Named Instance, you will need to append ;instance=mssqlnamehere to the connection string, where mysqlnamehere is the name of your named instance. For more details about syntax, please refer to the Microsoft SQL Server documentation.
    UsernameThe username that Bamboo will use to access your database.
    PasswordThe password that Bamboo will use to access your database.
  4. Select Overwrite existing data if you wish Bamboo to overwrite any tables that already exist in the database.
  5. Click Continue.

Screenshot: Set Up JDBC Connection SQL Server 2005/2008

Connecting using a datasource

To connect Bamboo to a MS SQL Server, using a datasource:

 

  1. Configure a datasource in your application server (consult your application server documentation for details).
    (info) For details about the syntax to use for the SQL Server database URL, please refer to the Microsoft SQL Server documentation.
  2. Run the Setup Wizard and choose the Custom Installation method.
  3. On the 'Choose a Database Configuration' page, choose External Database > Microsoft SQL Server 2005/2008 and click Continue. The 'Database Configuration' page will appear.
  4. Choose Connect via a datasource (configured in the application server), as shown in the screenshot below.
  5. In the JNDI name field, type the JNDI name of your datasource, as configured in your application server.
    (warning) If java:comp/env/jdbc/DataSourceName does not work, try jdbc/DataSourceName (and vice versa).
  6. Select Overwrite existing data if you wish Bamboo to overwrite any tables that already exist in the database.
  7. Click Continue.

 

Screenshot: Set up Datasource Connection

 


Unicode Characters Not Supported By Default

Problem
Non-ASCII characters will not be displayed by Bamboo.

Reason
The default SQL Server dialect uses column types that do not support Unicode, specifically the char, varchar and text column types. See CONF-4786 for details.

Solution
To add Unicode support, use the Unicode SQL Server dialect which uses nchar, nvarchar and ntext column types. Unicode SQL Server dialect has the downside of halving the maximum length of each column from 8000 characters to 4000, as every char is stored in two bytes.

Enable Unicode SQL Server dialect on a new setup, perform these steps prior to 'Step 3 - Database Connection Setup'.

  1. Open the <bamboo-install>\webapp\WEB-INF\classes\database-defaults\mssql.properties file within your Bamboo installation folder.
  2. Comment the line: dialect=net.sf.hibernate.dialect.SQLServerDialect
  3. Uncomment the line: #dialect=net.sf.hibernate.dialect.SQLServerIntlDialect
  4. Start the Bamboo Setup Wizard