首页 新闻 赞助 找找看

sql ef 死锁 问题

0
悬赏园豆:5 [待解决问题]

System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while reading from the store provider's data reader. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Transaction (Process ID 59) 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.TryHasMoreRows(Boolean& moreRows)
at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
at System.Data.SqlClient.SqlDataReader.Read()
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead()
--- End of inner exception stack trace ---
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.HandleReaderException(Exception e)
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.StoreRead()
at System.Data.Entity.Core.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at HSCP.BLL.OrderBLL.UpdateYY(String BillNo) in D:\99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\HSCP\Base\HSCP.BLL\Order\OrderBLL.cs:line 316
at HSCP.Web.BLL.OrderManager.CreateOrder(OrderAdd model, UserLogInfo uinfo) in D:\99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\HSCP\Sys\HSCP.Web.BLL\Order\OrderManager.cs:line 8304

程序员编程日记的主页 程序员编程日记 | 初学一级 | 园豆:6
提问于:2016-10-09 10:02
< >
分享
所有回答(1)
0

可以修改下transaction事务隔离级别, MS SQLSERVER默认的是read committed. 

| 园豆:128 (初学一级) | 2016-10-10 11:43

目前修改了  先观察一段时间看看 

支持(0) 反对(0) 程序员编程日记 | 园豆:6 (初学一级) | 2016-10-10 11:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册