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

SQL CONSTRAINT name for user privilege is too long for Oracle 11.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • Sentry
    • None

    Description

      Prior to Oracle version 12.2, identifiers are not allowed to exceed 30 characters in length
      Names must be from 1 to 30 bytes long with these exceptions:
      Names of databases are limited to 8 bytes.
      Names of database links can be as long as 128 bytes.

      The following index name is 32 bytes, and cause exception "ORA-00972: identifier is too long" on oracle DB 11.2.

      SENTRY_USER_DB_PRIVILEGE_MAP_PK
      SEN_USR_DB_PRV_MAP_SN_DB_PRV_FK

      ALTER TABLE SENTRY_USER_DB_PRIVILEGE_MAP
      ADD CONSTRAINT SENTRY_USER_DB_PRIVILEGE_MAP_PK PRIMARY KEY (USER_ID,DB_PRIVILEGE_ID);
      
      ALTER TABLE SENTRY_USER_DB_PRIVILEGE_MAP
         ADD CONSTRAINT SEN_USR_DB_PRV_MAP_SN_DB_PRV_FK 
         FOREIGN KEY (DB_PRIVILEGE_ID) REFERENCES SENTRY_DB_PRIVILEGE(DB_PRIVILEGE_ID);
      

      Need to change the constrain name to be smaller than 30 characters

      Attachments

        1. SENTRY-2259.001.patch
          12 kB
          Na Li

        Issue Links

          Activity

            People

              linaataustin Na Li
              linaataustin Na Li
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: