Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1066

Sentry oracle upgrade script failed with ORA-0955 duplicate name issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.5.1, 1.7.0
    • 1.7.0
    • None
    • None

    Description

      We've seen ORA-0955 duplicate name issue while running Sentry upgrade scripts.

      Running Oracle 11g. We eventually tracked it to /opt/cloudera/parcels/CDH/lib/sentry/scripts/sentrystore/upgrade/004-SENTRY-74.oracle.sql:

      ALTER TABLE SENTRY_DB_PRIVILEGE DROP CONSTRAINT "SENTRY_DB_PRIV_PRIV_NAME_UNIQ";
      ALTER TABLE SENTRY_DB_PRIVILEGE ADD CONSTRAINT "SENTRY_DB_PRIV_PRIV_NAME_UNIQ" UNIQUE ("SERVER_NAME","DB_NAME","TABLE_NAME","COLUMN_NAME","URI","ACTION","WITH_GRANT_OPTION");
      

      Although constraint was dropped, it fails to re-add, as there was an implicit index added with same name as well (expected behavior according to docs: http://docs.oracle.com/cd/B19306_01/server.102/b14200/clauses002.htm See: "Unique Constraints").
      Dropping the index allowed us to finish upgrading the schema successfully.

      Attachments

        1. SENTRY-1066.0.patch
          2 kB
          Anne Yu
        2. SENTRY-1066.1.patch
          2 kB
          Anne Yu

        Activity

          People

            anneyu Anne Yu
            anneyu Anne Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: