Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 sql exception - Transaction (Process ID 246) was d

Author  Topic 

ksams
Starting Member

1 Post

Posted - 2008-11-12 : 13:46:57
In my .Net web application, I am getting the following exception , not all the time. , sometimes. Please find below the details of this exception. Please help me tom understand this issue. Thanks


Type : System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Transaction (Process ID 246) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
Source : .Net SqlClient Data Provider
Help link :
Errors : System.Data.SqlClient.SqlErrorCollection
Class : 13
LineNumber : 65
Number : 1205
Procedure : spAddUpdateOrder
Server : DENSQLPC123\SQL001
State : 0
ErrorCode : -2146232060
Data : System.Collections.ListDictionaryInternal
TargetSite : Void OnError(System.Data.SqlClient.SqlException, Boolean)
Stack Trace : 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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

-Siva

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-11-12 : 13:51:23
As your error states your code is causing a deadlock between concurrent users. There is a lot in Books Online as well as a lot of sqlteam topics on the subject. You should search on "how to avoid deadlocks" and "trouble shooting deadlocks"

EDIT:
Books Online:
http://msdn.microsoft.com/en-us/library/aa213040(SQL.80).aspx
http://msdn.microsoft.com/en-us/library/aa937573.aspx

and some links here:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=20387


Be One with the Optimizer
TG
Go to Top of Page

karthickbabu
Posting Yak Master

151 Posts

Posted - 2008-11-13 : 00:24:47

Here is an detail document about Trouble Shooting DeadLocks

www.dowers.net/ftp/troubleshooting/SQL-TroubleshootingLocksdeadlocks.doc

================================================

When you realize you've made a mistake, take immediate steps to correct it.
Go to Top of Page
   

- Advertisement -