Print this page

I am getting ORA-20000: ORA-06512: upon upsert.

Knowledge Article Number 000123556
Description While trying to upsert a record getting error:

ORA-20000: ORA-06512: at "SNEEZY.SIMPORTLOOKUP", line 850 ORA-06512: at "SNEEZY.SIMPORTLOOKUP", line 823 ORA-06512: at line 1 : SQLException while executing plsql statement
Resolution Root cause of the issue: 

The optional External_ID_Field parameter is an optional variable that specifies the custom field that should be used to match records that already exist in your organization's data. This custom field must be created with the External Id attribute selected. 

Additionally, if the field does not have the Unique attribute selected, the context user must have the “View All” object-level permission for the target object or the “View All Data” permission so that upsert does not accidentally insert a duplicate record. 

You can refer the following document :

To avoid this, you can do one of the following: 
  1. Update the “field “ matching field "External_Id__c" to be unique. 
  2. Change the user profile(s) to view all data for the object 

promote demote