How to find the DDL for Bamboo tables

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

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.

ソリューション

Option 1 - DDL for startup

This will retrieve the SQL commands run during the SQL update steps in the startup process.

  1. Stop Bamboo
  2. Add the following line to <bamboo-install>/atlassian-bamboo/WEB-INF/classes/log4j.properties:

    log4j.logger.org.hibernate.SQL=TRACE
  3. Start Bamboo
  4. Once Bamboo has started up, run the following command on the command line:

    grep '\[SQL\]' <bamboo-home>/logs/atlassian-bamboo.log | grep 'alter table\|drop table\|create table' > sql.out
  5. 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)

  1. Start up a new instance with the following in <bamboo-install>/atlassian-bamboo/WEB-INF/classes/log4j.properties:

    log4j.logger.org.hibernate.SQL=TRACE
  2. Complete the setup wizard, connecting to the desired type of database
  3. Use grep or other string/regex manipulation on the generated logs:

    grep '\[SQL\]' <bamboo-home>/logs/atlassian-bamboo.log | grep 'alter table\|drop table\|create table' > sql.out



  4. sql.out will contain the queries


最終更新日 2021 年 4 月 12 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.