Example of Troubleshooting the Unique Constraint Error when Importing Accounts or Contacts
This example provides further detail to complement Troubleshooting the Unique Constraint Error When Importing Accounts or Contacts.
The unique constraint error when inserting records using EIM is usually due to inconsistent data in the base tables or incorrect data populated in the interface tables. The inconsistent data may result when two different server tasks, such as Siebel EAI processes and EIM processes, are run at the same time to import the same data.
For example, you populate the EIM_ACCOUNT table with a new record to be added to the S_PARTY table. Uniqueness for the S_PARTY table is based on the S_PARTY_U1 index. However, the associated record in the S_ORG_EXT table that EIM will create may be found to be a duplicate of an existing record in the S_ORG_EXT table, because uniqueness for the S_ORG_EXT table is based on the S_ORG_EXT_U1 index. This duplicate record may have been created by another process, such as an EAI process or a process initiated through the user interface.
Because the S_ORG_EXT table is considered a 1:1 extension table of the S_PARTY table, EIM only checks if there is an existing S_ORG_EXT record that references the S_PARTY row in the PAR_ROW_ID column. In this case, no record is returned since the S_PARTY record is a new one. As a result, the S_ORG_EXT_U1 index is violated when EIM tries to insert the record into the S_ORG_EXT table. This incomplete EIM job then creates new S_PARTY rows without the associated S_ORG_EXT rows.
The PARTY_UID column is part of the user key for the S_PARTY table and is used by the EIM process to identify if an account or contact record is a new record or an existing record.
The S_PARTY.PARTY_UID is a user-definable key and can have any of the following values:
If contact or account data is being migrated from a system external to Siebel, then the PARTY_UID column can be any user-defined key value or contact or account key in the external system.
If the contact record is created using the Siebel Web Client, then S_PARTY.PARTY_UID is set to the value in S_PARTY.ROW_ID by default.
If the account record is created using the Siebel Web Client, then S_PARTY.PARTY_UID is set to the same value in S_PARTY.ROW_ID by default.
The remainder of this topic is divided into two parts which detail diagnostics steps for each of the following two scenarios:
Contact data import. See Example of Troubleshooting the Import of EIM Contact Data into the S_CONTACT Table.
Account data import. See Example of Troubleshooting the Import of EIM Account Data into the S_ORG_EXT Table.