Some info about "dead lock"

L-Tryosine
L-Tryosine used Ask the Experts™
on
I´m using Delphi 3, SQL Server 7.0.
I´m getting this "dead lock" error message on some random times on the application, that is starting to bring troubles...
What is the error, on what situations it happens, and what can be done to fix?

Thanks for any help!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Deadlock is the common disadvantage in locking method. But I thought SQL Server solves it...
Commonly in locking
1. Every transaction (tr) locks all data items (di), which it intends access.
2. Then makes all operations.
3. Then unlocks al unlocked data.
AS far as I know the problem appears when two transactions wait for each-other to finish:
For example trA and trB must lock diA and diB.
1. trA locks diA and trB locks diB.
2. trA wants to lock diB, but can not, because it is already locked. Same thing with trB. It can not lock diA.
3. They are waiting for each other.
I think you can regulate it by changing some server policies. Hope it will help...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial