Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    p_manage_01 in xxx60: Z97_ID3; cannot CREATE UNIQUE INDEX; duplicate keys found

    • Article Type: General
    • Product: Aleph
    • Product Version: 20, 21, 22, 23

    When running p_manage_01 in ABC60 we see this error message in create_ora_tables_z97_id3.log:

    aleph_admin@ALEPH01> 15:26:26 aleph_admin@ALEPH83> CREATE UNIQUE INDEX ABC60.Z97_ID3 ON ABC60.Z97 (Z97_REC_NUMBER_
    2 ASC)
    ERROR at line 1:
    ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found

    z97_id3 indexes the words number, which comes from the "last-word-number" sequence. In UTIL G 2 in ABC60 counter "last-word-number" has been missing.

    Adding counter last-word-number to UTIL G 2 has solved the problem (after reindexing the database with p_manage_01):
    Enter sequence number to update,
    or return to continue, or NEW to create new sequence, or 0 to exit: NEW
    Enter sequence name (lower case): last-word-number
    Enter sequence start number: 0
    Enter prefix for format output:
    Do you want to supress leading zeros in format output (y/n): y
    Enter type (S/U): S
    Confirm (y/n): y

    Sequence Name Value Suppress Type Prefix
    -------------------- --------- -------- ---- --------------------
    1. change-file-name 3 Y S Global-
    2. last-acc-number 2534678 y S
    3. last-doc-number 6812798 y S
    4. last-file-number 3621 y S hol-
    5. last-long-acc-number 2533486 Y S
    6. last-word-number 0 Y S
    7. library-lock-status 0 y S
    8. max-z02-count 0 n S
    9. session-id 0 y S SESSION-

    Note1: The reason that the last-word-number parameter was missing from the abc60 library is that its z52 (util g/2) parameters had been derived from the usm60 z52 which lacks the last-word-number parameter -- as the Words are not usually built in the xxx60 HOL library.

    Note2: Though, normally, a problem with an Oracle index would require only rebuilding the Oracle index, in this case, the z97 records have been created with defective keys and the job needs to be rerun to recreate them properly.

    The article  How to set up Words in the xxx60 HOL library  (KB 16384-44609)( includes other steps necessary for setting up Words in the xxx60 library.

    • Article last edited: 10/8/2013