ORA-00001: unique constraint (HARVEST.HARAUDITEVENT_PK) violated SQLSTATE=23000
search cancel

ORA-00001: unique constraint (HARVEST.HARAUDITEVENT_PK) violated SQLSTATE=23000

book

Article ID: 53246

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager

Issue/Introduction

In Oracle, you can create an autonumber field by using sequences.

A sequence is an object in Oracle that is used to generate a number sequence.

This can be useful when you need to create a unique number to act as a primary key. 

If the sequence counter generates an already existing OBJID, then we you will receive an error similar to the following when performing certain actions in Harvest (i.e. reset Harvest user password)

ORA-00001: unique constraint (HARVEST.HARAUDITEVENT_PK) violated SQLSTATE=23000

Environment

Harvest 14.5.x

Oracle Database

Resolution

Run the attached database script file against the Harvest database.

This script will identify any cases where the sequence IDs are out of sync and generate the necessary DROP SEQUENCE and CREATE SEQUENCE statements to correct the problem.

Please pay close attention to the comments at the top of the file

The output file from running the script will provide the database statements that will address any identified sequence ID issues, but does not execute them, allowing you and your DBA a chance to review the results and confirm before moving forward with the corrective action.

After running the correction database statements, please try the Harvest action that resulted in the ORA-00001 error.

Attachments

reset_sequences_14.5_sql.txt get_app