External Database MS Sql Server (2005) not getting setup correctly
Asked by Daniel DiVita:

I am setting up a new instance of Bamboo using an MS Sql Server for the database. It takes a while and seems like there are errors creating the DB. Bamboo is creating tables, but during setup it goes back to the Setup External database screen. I have tried dropping the DB, stopped the Bamboo service, removed the bamboo home directory.  

Looking at the log I see this error during the DB creation:  
2017-12-14 11:39:08,767 INFO \[http-apr-8085-exec-11\] \[AccessLogFilter\] 127.0.0.1 POST http://localhost:8085/setup/performSetupDatabaseConnection.action 540286kb  
2017-12-14 11:39:09,540 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[QuartzScheduler\] Scheduler scheduler_$_NON_CLUSTERED started.  
2017-12-14 11:39:09,552 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[DefaultHibernateConfigurator\] Spring context refreshed after 40.72 s  
2017-12-14 11:39:09,552 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[DefaultHibernateConfigurator\] Creating Bamboo schema...  
2017-12-14 11:39:10,299 WARN \[performSetupDatabaseConnectionBackgroundThread\] \[SqlExceptionHelper\] SQL Warning Code: 1945, SQLState: S0001  
2017-12-14 11:39:10,299 WARN \[performSetupDatabaseConnectionBackgroundThread\] \[SqlExceptionHelper\] Warning! The maximum key length is 900 bytes. The index 'ASSIGNMENT_UNIQUE' has maximum length of 1036 bytes. For some combination of large values, the insert/update operation will fail.  
2017-12-14 11:39:10,362 WARN \[performSetupDatabaseConnectionBackgroundThread\] \[SqlExceptionHelper\] SQL Warning Code: 1945, SQLState: S0001  
2017-12-14 11:39:10,362 WARN \[performSetupDatabaseConnectionBackgroundThread\] \[SqlExceptionHelper\] Warning! The maximum key length is 900 bytes. The index 'notifications_unique' has maximum length of 2048 bytes. For some combination of large values, the insert/update operation will fail.  
2017-12-14 11:39:10,553 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[DefaultHibernateConfigurator\] Bamboo schema created.  
2017-12-14 11:39:10,577 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[DefaultBootstrapManager\] Running validation tasks  
2017-12-14 11:39:10,842 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] -------------------------------------------------------------------  
2017-12-14 11:39:10,842 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] 1 : Validate that JDBC driver is available in classpath (bootstrap)  
2017-12-14 11:39:10,842 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] -------------------------------------------------------------------  
2017-12-14 11:39:10,854 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] Task 1 completed successfully.  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] ---------------------------------------------------------------------------  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] 2 : Validate if build number in home directory matches database (bootstrap)  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] ---------------------------------------------------------------------------  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] Task 2 completed successfully.  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] -----------------------------------------------------------------  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] 2901 : Test if build number is applicable for upgrade (bootstrap)  
2017-12-14 11:39:10,855 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] -----------------------------------------------------------------  
2017-12-14 11:39:10,856 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] Task 2901 completed successfully.  
2017-12-14 11:39:10,856 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] ------------------------------------------------------------  
2017-12-14 11:39:10,856 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] 2902 : Test if plan keys are correctly formatted (bootstrap)  
2017-12-14 11:39:10,856 INFO \[performSetupDatabaseConnectionBackgroundThread\] \[BootstrapUpgradeManagerImpl\] ------------------------------------------------------------  


Answers:
author: somethingblue
body: Hi Daniel,

In the title of your post it looks like you're using MS SQL Server 2005 and attempting to use the latest version of Bamboo (6.2). If that is correct the first thing we'll need to do is upgrade to a [Supported version](https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html) of MS SQL:

**Microsoft SQL Server:**

![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) SQL Server 2012

![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) SQL Server 2014

![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) SQL Server 2016

Once you upgrade to a supported version of SQL Server please retry and if you still run into the same issue let me know and we'll go from there. If you are indeed using a Supported version of SQL Server let me know that as well.

Cheers,

Branden


author: Daniel DiVita
body: I just tried a higher version of SQL and it seems to work.

comments: author: somethingblue
body: Awesome! I'm glad we were able to figure that out and I hope the rest of your install is easy going!