[Bamboo Knowledge Base]
This page describes how to connect Bamboo to a Microsoft SQL Server database.
See Supported platforms for other information about the versions of SQL Server supported by Bamboo.
Note that the JDBC driver for SQL Server is bundled with Bamboo. You do not have to download and install the driver.
On this page:
Express Editions: SQL Server Express 2005, 2008 and 2012 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, SQL Server Express 2012 feature comparison). However, the instructions below describe how to connect Bamboo to SQL Server Express 2005/2008/2012.
Before you connect Bamboo to a SQL Server, you need to configure SQL Server appropriately.
After configuring the SQL Server, you need to create the SQL database.
Configure the database to use the correct isolation level— 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>';
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.
If you are planning to support Unicode in Bamboo please enable unicode settings for SQL Server
Ensure that Direct JDBC connection has been selected and complete the following fields (as shown in the screenshot below):
Setting | Description |
---|---|
Driver Class Name | Type net.sourceforge.jtds.jdbc.Driver (if different from the default) |
Database URL | The 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. |
Username | The username that Bamboo will use to access your database. |
Password | The password that Bamboo will use to access your database. |
Screenshot: Set Up JDBC Connection SQL Server 2005/2008
java:comp/env/jdbc/DataSourceName
does not work, try jdbc/DataSourceName
(and vice versa).
Screenshot: Set up Datasource Connection
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'.