Skip to main content

Merge Statement Conflicted with the FOREIGN KEY Constraint Error in SPSEEK Bulk Import Job

Symptom

When you attempt to run the SPSEEK Bulk Import job, you see the following error:

[C:102] Unable to perform bulk import
Error: The MERGE statement conflicted with the FOREIGN KEY SAME TABLE constraint %FK_constraint%.
The conflict occurred in database %database_name%, table %table_name%.
The statement has been terminated.

Cause

The foreign key constraint conflict was caused during the latest scan.

Resolution

Drop the SharePoint tables and run the scan again. To drop the tables, run the SP_DropTables job. For additional information, refer to the following Netwrix Access Analyzer article:

  1. SharePointAccess Data Collector − SPAA Drop Tables & Views Workflow ⸱ v11.6
    https://docs.netwrix.com/docs/auditor/10_8