metricsign
Start free
Medium severitydata integrity

Power BI Refresh Error:
2601

What does this error mean?

An INSERT violated a unique index — a row with the same key already exists in the table.

Common causes

  • 1A non-constraint unique index is violated by duplicate source data
  • 2Pipeline retried after a partial success, re-inserting already-loaded rows
  • 3Source system sent duplicate records in the same batch

How to fix it

  1. 1Step 1: Identify the index and duplicate value from the error message. Find duplicates: SELECT <indexed_columns>, COUNT(*) FROM <table> GROUP BY <indexed_columns> HAVING COUNT(*) > 1;
  2. 2Step 2: Deduplicate the source before loading: use a CTE with ROW_NUMBER() to keep only the first occurrence per key.
  3. 3Step 3: For ADF, enable upsert mode in the sink to handle re-runs gracefully — specify the unique index columns as the key.

Frequently asked questions

How do I find which unique index caused error 2601?

The error message includes the index name, e.g. 'Cannot insert duplicate key row in object 'dbo.MyTable' with unique index 'IX_MyTable_Email'. Use that index name to find the indexed columns: SELECT * FROM sys.index_columns WHERE object_id = OBJECT_ID('dbo.MyTable');

Does ADF automatically handle unique index violations?

No — by default ADF uses INSERT and will fail on duplicates. Enable Upsert in the sink settings to generate MERGE statements that handle existing rows.

Should I drop the unique index to stop the errors?

Almost never — unique indexes enforce data integrity. Fix the root cause (deduplication in source or upsert logic) rather than removing the constraint.

Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-2601-database-engine-error

Other data integrity errors