Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

XtkWorkflowTask duplicated key row error

Avatar

Level 1

We recently upgraded to build 9032 and tonight was the first time I imported database schema from our test instance into our production instance. The import was successful without any errors, however, after the import all my workflows and campaigns started throwing this error. Has anyone encountered this issue before and how to resolve?

 

WDB-200001 SQL statement 'INSERT INTO XtkWorkflowTask (dMaxExecutionTime, iWorkflowId, iWorkflowTaskId, tsProcessing, tsNextProcessing, iStatus, iAbortReason, tsCompletion, iTaskIdentifier, tsCreation, tsRunning, iProcessingCount, sHostname, sActivity, i
LastErrorCode, iAssigneeType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' could not be executed. Param(0)=0s Param(1)=259395 Param(2)=0 Param(3)=07/20/2020 9:35:22 PM Param(4)=07/20/2020 10:00:00 PM Param(5)=0 Param(6)=0 Para
m(7)= Param(8)=71632 Param(9)=07/20/2020 9:35:22 PM Param(10)= Param(11)=1 Param(12)=SERVERNAME Param(13)=schedule Param(14)=0 Param(15)=0
ODB-240000 ODBC error: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Cannot insert duplicate key row in object 'xxxxxxx.XtkWorkflowTask' with unique index 'XtkWorkflowTask_id'. The duplicate key value is (0). SQLState: 23000
ODB-240000 ODBC error: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]The statement has been terminated. SQLState: 01000

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @anhg ,

 

You can refer to this documentation for how to resolve the sequence.

 

https://helpx.adobe.com/campaign/kb/sequence_auto_generation.html

 

Thanks,

View solution in original post

1 Reply

Avatar

Level 1

It looks like the primary id sequence for this table is reset to 0 after my schemas import (the schemas were for new custom tables and did not have any changes made to any out of the box schemas). How do I reset this primary key to start from the latest value + 1?.

Avatar

Correct answer by
Community Advisor

Hello @anhg ,

 

You can refer to this documentation for how to resolve the sequence.

 

https://helpx.adobe.com/campaign/kb/sequence_auto_generation.html

 

Thanks,

Avatar

Level 1
Thank you so much _Manoj_Kumar! 9 rows of data were somehow removed from the XtkNewID table when I imported the new schemas and I had to manually add them back to the table to resolve the errors.