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

Migration is failing on Oracle when schema is copied/refreshed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.4, 8.4.1, 8.4.2
    • Fix Version/s: 8.5.1, 8.6
    • Component/s: Database
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      When user is trying to migrate from X to 8.4 or later using existing schema which was imported from an Oracle `imp` tool, migration fails to finish with error:
      “ORA-00955: name is already used by an existing object”

      This error breaks possibility to restore backup for Oracle DB users.

      Technical notes:
      Main cause of an error is because Oracle DB does not delete indexes of primary keys which were not created during constraint creation.
      Schema imported by tools such as “imp” does such thing: it creates index and then constraint, that means that during removal of a constraint, index is not deleted, hence error occur.

      Useful link: https://www.vertabelo.com/blog/why-does-oracle-sometimes-not-drop-an-index-associated-with-a-primary-key-or-unique-constraint/

        Attachments

          Activity

            People

            Assignee:
            jacek.poreda Jacek Poreda
            Reporter:
            jacek.poreda Jacek Poreda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: