Getting SQL execution error, ORA-00001: unique constraint (ARGUS_APP.UC_CMN_AUDIT_LOG_AUDIT_ID) violated When Upgrading From 6.0.1 To 7.0.1 (Doc ID 1589511.1)

Last updated on MAY 06, 2015

Applies to:

Oracle Argus Safety - Version 7.0.3 and later
Information in this document applies to any platform.
***Checked for Currency: 05-May-2015***

Symptoms

Getting the following error when upgrading from 6.0.1 to 7.0.1, upgrade is completed with one error:


SQL execution error, ORA-00001: unique constraint (ARGUS_APP.UC_CMN_AUDIT_LOG_AUDIT_ID) violated
ORA-06512: at line 10


This is the sql where we got unique constraint violation error.
declare
cursor c1 is
select rowid
from cmn_audit_log
where audit_id is null;
ln_audit_id number;
begin
for x in c1 loop
select PKG_CONSOLE_UTIL.F_GET_SEQ_NEXT_VAL('S_CMN_AUDIT_LOG_AUDIT_ID') into ln_audit_id from dual;
update cmn_audit_log
set audit_id = ln_audit_id
where rowid = x.rowid;
end loop;
commit;
end;


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms