From yesterday our Data Warehouse running on Azure SQL Server getting the error:
Cannot insert duplicate key row in object 'odl.Dim_TraceBackFinishedProduct' with unique index.
SQL - Fail Parent:Error: Executing the query "RAISERROR('Cannot insert duplicate key row in obje..." failed with the following error: "Cannot insert duplicate key row in object 'Dim_TraceBackFinishedProduct' with unique index 'PK_TraceBackFinishedProduct_TraceBackFinishedProductSK'. The duplicate key value is (-2147293203).". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
Scripte to create table:
CREATE TABLE odl.Dim_TraceBackFinishedProduct ( TraceBackFinishedProductSK int IDENTITY(-2147483648,1) NOT NULL, TraceBackFinishedProductBK binary(32) NOT NULL, <and many other columns> ) ON PRIMARY GO
Script to create index:
CREATE UNIQUE CLUSTERED INDEX PK_TraceBackFinishedProduct_TraceBackFinishedProductSK ON odl.Dim_TraceBackFinishedProduct (TraceBackFinishedProductSK ASC) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON PRIMARY GO
I am not an experienced SQL DBA, so I have just rebuilt the index but the issue still insists on.
Any your guidance is much appreciated. Thank you in advance