Skip to main content


 

Symptoms


The DELETE statement conflicted with the REFERENCE
 

Diagnoses


On Startup of K2 server we get 4 error log entries like the below.

Log Name: Application
Source: SourceCode.Logging.Extension.EventLogExtension
Date: 2015-05-08 12:20:27
Event ID: 1
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: HOK2.SACD.CO.ZA
Description:
1 The DELETE statement conflicted with the REFERENCE constraint 'FK_ServerLog_ItemInstance_ItemID_ServerLog_Item_ID'. The conflict occurred in database 'K2', table 'ServerLog.ItemInstance', column 'ItemID'.
The DELETE statement conflicted with the REFERENCE constraint 'FK_ServerLog_Item_ProcID_ServerLog_Proc_ID'. The conflict occurred in database 'K2', table 'ServerLog.Item', column 'ProcID'.
The statement has been terminated.
The statement has been terminated.
Event Xml:



1
2
0
0x80000000000000

262286
Application
HOK2.SACD.CO.ZA



1 The DELETE statement conflicted with the REFERENCE constraint 'FK_ServerLog_ItemInstance_ItemID_ServerLog_Item_ID'. The conflict occurred in database 'K2', table 'ServerLog.ItemInstance', column 'ItemID'.
The DELETE statement conflicted with the REFERENCE constraint 'FK_ServerLog_Item_ProcID_ServerLog_Proc_ID'. The conflict occurred in database 'K2', table 'ServerLog.Item', column 'ProcID'.
The statement has been terminated.
The statement has been terminated.





A SQL Profiler Trace shows the failing SQL statement to be: exec cServerLog].]lCreateLogBatch] @ID=6839,@ProcInstID=0



 

Resolution

Resolution:
A new TFS item was created and this ticket has been linked to it.
546254: After upgrade from Appit 1.0 (RTM) to 1.1 (4.6.9), K2HostServer throws SQL errors

There is a coldfix currently available for 4.6.9 which after the applying to the client database the client re-started their K2 service and no errors were logged, thus this issue being resolved.

As for your questions please find the answers below (A):
PROCEDURE was a CREATE we changed it to an ALTER PROCEDURE?
(A) Yes, that is perfect.
I have assumed this new version of the stored procedure will remain permanently - and is not just a temporary replacement.
(A) Yes, this is a permanent fix.




 
Be the first to reply!

Reply