How to find the DDL for Bamboo tables
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 troubleshooting some errors, it may be helpful to find the Database Definition Language (DDL) or SQL commands that are run when building your Bamboo database.
Solution
Option 1 - DDL for startup
This will retrieve the SQL commands run during the SQL update steps in the startup process.
Stop Bamboo
Add the following line to
<bamboo-install>/atlassian-bamboo/WEB-INF/classes/log4j.properties
:1
log4j.logger.org.hibernate.SQL=TRACE
Start Bamboo
Once Bamboo has started up, run the following command on the command line:
1
grep '\[SQL\]' <bamboo-home>/logs/atlassian-bamboo.log | grep 'alter table\|drop table\|create table' > sql.out
sql.out
will contain the queries.
Option 2 - DDL for new install
This will retrieve the SQL commands run on install (when creating a new Bamboo database)
Start up a new instance with the following in <bamboo-install>/atlassian-bamboo/WEB-INF/classes/log4j.properties:
1
log4j.logger.org.hibernate.SQL=TRACE
Complete the setup wizard, connecting to the desired type of database
Use grep or other string/regex manipulation on the generated logs:
1
grep '\[SQL\]' <bamboo-home>/logs/atlassian-bamboo.log | grep 'alter table\|drop table\|create table' > sql.out
sql.out
will contain the queries
Was this helpful?