MSSQL database name is case-sensitive but doesn't inform that in the UI

XMLWordPrintable

    • 1

      Issue Summary

      When connecting Bamboo to a Microsoft SQL Server database, the database name in the connection string is case-sensitive. There's no indication of that requirement in the UI, or any error message showing up in case a related error is present in the logs.

      Steps to Reproduce

      Install Bamboo with a MSSQL external database without making sure the database name is correct case-sensitive-wise.
      E.g., database name = Bamboo, database name in the connection string = bamboo.

      Expected Results

      The setup wizard would tell us the database doesn't exist (case-sensitive).

      Actual Results

      The installation doesn't proceed and just throw some Freemarker errors.

      The below exception is thrown in the atlassian-bamboo.log file:

      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The database name component of the object qualifier must be the name of the current database.  

      Suggestion

      Either add a message to the UI when selecting MSSQL as the external database saying that the database name is case-sensitive, or add a mechanism that gives the exact error in the UI when the related error is thrown to the atlassian-bamboo.log

      Solution

      1. Get the name of the database by running this SQL query:
        SELECT name, database_id, create_date  
        FROM sys.databases; 
      1. Compare it with the database name configured in <bamboo-home>/bamboo.cfg.xml at the hibernate.connection.url property. E.g.,
        <property name="hibernate.connection.url">jdbc:sqlserver://testSql:1433;databaseName=bamboo</property>
        
      1. Update the database name in the .xml file so that it matches the name of the database from the SQL query (case sensitive)
      2. Restart Bamboo

            Assignee:
            Unassigned
            Reporter:
            Eduardo Collaziol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: