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)
 Transaction (Process ID 72) was deadlocked on lock

Author  Topic 

sitakanta.padhy
Starting Member

2 Posts

Posted - 2010-10-11 : 06:43:23
I receive an error/exception message sometimes as below.
Transaction (Process ID 72) was deadlocked on lock | communication buffer resources with another process and has choosen as the deadlock victim. Return the transaction.

I am using vb.net as my code language. I am not using any transaction statement in my code.

Any help is appreciated!

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-10-11 : 07:16:01
Whenever you issue a request to the database, be that a SELECT or an UPDATE or and INSERT or a DELETE then you are performing a TRANSACTION. Transactions are the things that SQLSERVER uses to provide atomicity (ensuring that all of a statement will be performed or none of it will be).

When you have two or more transactions all trying to access the same data at the same time then you may get a deadlock. This is where SQLServer chooses one of the processes to prioritise and discards the other processes. The way that it does this is to choose "the most expensive" transaction to keep and throw away the rest.

If this is happening to you then it's generally a good indication that the sql code you are issuing is performing poorly. This can be because of : badly written SQL queries, inadequate / lacking index(es) / out of date statistics / etc.

Just google "SQL Server Deadlock" and start reading.

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

sitakanta.padhy
Starting Member

2 Posts

Posted - 2010-10-13 : 09:59:48
Actually, there is a need to capture the fields which were modified by the user & hence in my table for a single field, I have three fields to keep track of it.
1) Old field value
2) New Field Value
3) Field Modified flag
Every time I have to check for any modification done from frontend, and I update the respective fields accordingly.
The application used by many users, but they are updating diferent rows at a single point of time.
I'm not using any transaction statement in my program. But for every field modified by user, I checked it & updates using update query.
Say for 3 fields modified, I'm using 3 update queries.

I think now you got clear idea about the situation.
Any Help is appreciated....
:)
Go to Top of Page
   

- Advertisement -