我有一个程序,我的生产服务器,返回此错误的:控制台程序僵持
我最关心的是,如果我的计划是在生产服务器上为什么 其返回的位置,我的源代码中的错误?
另外什么是调试这种类型的死锁错误和 是由服务器上缺乏资源造成的?
Transaction (Process ID 73) was deadlocked on thread | communication buffer 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)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.Read()
at Microsoft.Data.Extensions.Materializer`1.d__a.MoveNext()
at Microsoft.Data.Extensions.Materializer`1.d__0.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Console.Export.DataProvider.ExportData(IEnumerable`1 activitiesParam) in D:\Documents and Settings\USER\Desktop\11_16_2011\ITS\Console\Export\DataProvider.cs:line 44
at Console.Export.WarDataProvider.GetValues() in D:\Documents and Settings\USER\Desktop\11_16_2011\ITS\Console\Export\DataProvider.cs:line 31
at Console.Export.ExportEngine.Export(IDataProvider provider) in D:\Documents and Settings\USER\Desktop\11_16_2011\ITS\Console\Export\ExportEngine.cs:line 25
之一是这个计划在不同的线程中发出多个SQL命令,还是在尝试使用SQL DB时与其他软件冲突? – Turowicz 2011-12-21 16:56:04
僵局并不直接与缺乏资源有关。简单地说:竞争SPID每个都有另一个想要的锁 – 2011-12-21 17:03:20
@turowicx我不认为它正在运行多个线程,但它依次运行多个更新,一个接一个。 – 2011-12-21 17:16:42