Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13594

Upgrade to 8.4 fails on MS SQL Server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 8.4
    • Fix Version/s: 8.4.1, 8.5
    • Component/s: None
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      A step in the migrations fails for some instances if:

      • The sonar DB has a case sensitive collation
      • The index 'GROUPS_USERS_UNIQUE' exists with upper case

      We are not sure why the index exists in some instances with upper case name, but it might be the result of a past migration.

       The fix will probably involve checking for the index using both the upper case and lower case names, in a case sensitive way, and delete if any is found.

       

       org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #3609 'Drop index on 'group_id' column of 'GROUPS_USERS' table' failedorg.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #3609 'Drop index on 'group_id' column of 'GROUPS_USERS' table' failed at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79) at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67) at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:405) at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52) at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:68) at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105) at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)Caused by: java.lang.IllegalStateException: Fail to execute DROP INDEX groups_users_unique ON groups_users at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:106) at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:86) at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:128) at org.sonar.server.platform.db.migration.version.v84.groups.groupsusers.DropIndexOnGroupIdOfGroupsUsersTable.execute(DropIndexOnGroupIdOfGroupsUsersTable.java:47) at org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45) at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75) ... 9 common frames omittedCaused by: com.microsoft.sqlserver.jdbc.SQLServerException: Löschen des Index-Objekts 'groups_users.groups_users_unique' ist nicht möglich, weil das Objekt nicht vorhanden ist oder Sie nicht die erforderliche Berechtigung haben. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1624) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:868) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:768) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2979) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223) at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:744) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194) at org.sonar.server.platform.db.migration.step.DdlChange$ContextImpl.execute(DdlChange.java:91) ... 14 common frames omitted

        Attachments

          Activity

            People

            • Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              duarte.meneses Duarte Meneses
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: