Error code

SQL Server 2627

SQL SERVER2627
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

violation of PRIMARY KEY or UNIQUE constraint — duplicate key value.

How to fix it

  1. Use MERGE or an existence check before inserting to prevent duplicate key inserts.
  2. Remove or update the conflicting row before retrying the INSERT.
  3. Review whether the application is generating duplicate identifiers and add deduplication logic.

Not affiliated with SQL Server. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.