1
SQL Errors after upgrade from 7.x to 14.x
Problem reported by Glen Harvy - 7/5/2018 at 4:08 PM
Resolved
I am repetitively receiving the following error after upgrading:
 
=====================
[2018-07-05 2:39:02 AM]
Auto Purge Deleted Thread error detected
The DELETE statement conflicted with the REFERENCE constraint "FK_st_TicketLinks_st_Tickets2". The conflict occurred in database "DB_3912_supportmycou", table "dbo.st_TicketLinks", column 'TicketID_Secondary'.
The statement has been terminated.
System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_st_TicketLinks_st_Tickets2". The conflict occurred in database "DB_3912_supportmycou", table "dbo.st_TicketLinks", column 'TicketID_Secondary'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at SmarterTrack.Data.SqlHelperInternal.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at SmarterTrack.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at SmarterTrack.Data.DataLayerShortcut.ExecuteNonQuery(IDbConnection& conn, String query, SqlParameter[] parameters)
   at SmarterTrack.Data.TicketEntity.PurgeFromDatabase(IDbConnection& connection, List`1 ticketIDs)
   at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.#0zc()
   at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.#Zzc()
   at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.DoWork()
ClientConnectionId:4733f7ac-7ca2-4b17-a09a-9967952bb766
Error Number:547,State:0,Class:16
 
Why is this occurring?
 
 

2 Replies

Reply to Thread
0
Andrew Barker Replied
Employee Post
Thank you for bringing this to our attention. It looks like your instance of SmarterTrack is trying to perform a scheduled auto-purge, but one of the tickets that it is trying to purge is linked to another ticket, chat, or task. I have added this to our list of items to be repaired.
Andrew Barker Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com
1
Eric McCarthy Replied
Employee Post
In SmarterTrack version 14.1.6773 we have resolved this issue.
Eric McCarthy Software Developer SmarterTools Inc. (877) 357-6278 www.smartertools.com

Reply to Thread