Получение этой ошибки в журналах планировщика . Пожалуйста, объясните причину и решения
2016-07-07 14:13:10.8460202 : Application Started ................................................... 2016-07-07 14:13:10.8519924 : Email Sending Started .................................. 2016-07-07 14:13:57.1407184 : DynECT Error:Transaction (Process ID 87) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.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.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at FRSQL.DB.GetDataSet(SqlCommand myCmd) at FrontRushDataAccess.MessageQueueDataAccess.getMessagesQueueDynECT() at FrontRushEmail.Process.SendMailsDynECT(String& totalMessages, String& totalMessageinDB, String& totalTimeFromDB) at FrontRushEmail.Program.StartProcessForDyn(String& totalMessages, String& totalMessageinDB, String& totalTimeFromDB) 2016-07-07 14:13:57.1417186 : DynECT: "Time: 2016-07-07 14:13:57.1407184"," Total Messages in DB : 0"," Total messages to be processed :0"," Time Taken: 00:00:46.2892131"," Total Time from DB : "," Total Avg time per msg(seconds): 46.2892131", " Batch Size: 20" 2016-07-07 14:13:57.1417186 : Application Finished ...................................................
Что я уже пробовал:
Транзакция (идентификатор процесса 87) была заблокирована на ресурсах блокировки другим процессом и была выбрана в качестве жертвы взаимоблокировки. Повторите транзакцию. в системе.Данных.Sqlclient как.Объект sqlconnection.OnError (исключение SqlException, Boolean breakConnection, Action`1 wrapCloseInAction)