Home > Oracle Apps > ORA-00001: unique constraint (APPLSYS.AD_SNAPSHOT_FILES_U2) violated

ORA-00001: unique constraint (APPLSYS.AD_SNAPSHOT_FILES_U2) violated

Today while cloning a DEV instance, I got below error while running adadmin utilitu to update the snapshot information

AD Administration error:
adusnapUpdateGlobalView(): Error while executing statement

AD Administration error:
ORA-00001: unique constraint (APPLSYS.AD_SNAPSHOT_FILES_U2) violated
ORA-06512: at “APPS.AD_FILE_UTIL”, line 2398
ORA-06512: at line 3

AD Administration error:
adusnapStoreInDB(): Error calling adusnapUpdateGlobalView()

Failed to store APPL_TOP Snapshot to tables
adusnapMaintainSnapshot() : Error calling adusnapUpdateCurrentView()
Error calling adusnapMaintainSnapshot
 

Fix applied to resolve the issue
Ran below 2 SQLs in the cloned instance using APPS user

  1. select distinct(snapshot_id) from ad_snapshot_files
  2. select distinct(snapshot_id) from AD_SNAPSHOT_BUGFIXES

And looked for any value with ‘minus’ sign. You need to remvoe/delete the record with “minus” sign. (Dont DELETE the other entry). I used below DELETE statements to delete the duplicate (with minus sign) record

  1. delete from ad_snapshot_files where snapshot_id=<value_with_minus_sign>
  2. delete from AD_SNAPSHOT_BUGFIXES where snapshot_id=-<value_with_minus_sign>

If the offending records are not deleted from both the tables above, adadmin will error out again. This happened with me. I first removed only from ad_snapshot_files table and adadmin errored out again.

Restarted the adamdin utility and continued with the previous session. All went fine.

-Anand

Advertisements
Categories: Oracle Apps
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: