Violation of PRIMARY KEY '[PRIMARY_KEY]'. Cannot insert duplicate key

Cause

This error occurs when the same primary key is used for two records. This can occur, for example, if data is loaded twice into the same table. This means that the data already exists and that it cannot be uniquely assigned by the primary key.

Another reason for the error message can be the Database Collation if it is set to "Case Insensitive". Having colliding Primary Keys in SAP like Language Key 'd' and 'D' leads to the violation. This can only be solved by solution 2.

Solution

The problem can be solved by checking the Use initial download (not recommended) option. This recreates the tables and a primary key violation cannot occur.

Another option is to deactivate the option Use primary key from SAP®. This creates a unique primary key for each record using the dab:Exporter.


How did we do?


Powered by HelpDocs (opens in a new tab)

Powered by HelpDocs (opens in a new tab)