ORA-00001: unique constraint error while updating jobs

Document ID : KB000032884
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue

While updating Jobs we get the following errors

CAUAJM_I_50323 Inserting/Updating job:  < Job_Name>

CAUAJM_E_18416 Event Server: <xxxxx> Failed Query: <INSERT into ujo_file_watch_job (joid, job_ver, over_num ,file_name,file_size,poll) VALUES (11507, 2, -1 

CAUAJM_E_18402 ORA-00001: unique constraint

Environment

It can occur on any environment: Unix/Linux/Windows with any database

Cause

Getting error message:  ORA-00001: unique constraint

This error is usually caused by a duplicate joid in the job_runs

 

Resolution/Workaround

If the problem is only limited to a few jobs then best solution would be to delete and recreate the job.

autorep -J < job name> -q > definition

jil < definition

This will create the job with a new JOID. The faulty job_runs entry will be archived by the DBMaint script in due course.