Subject What can be the possible cause for this lock
Author Johannes Pretorius
Good day all
-0=0-==-0-0=

I want to thank everybody for all the help with the
queries regarding " Transaction and Stored procedures." and "Triggers/Stored procs and Locks"

I have the following scenario we have problems with, and I want to ask if somebody can give us ideas on
why this will happen

In this scenario lets say we have 3 types of clients
A) Client A that INSERTS and UPDATES data into database and refreshes data from stored procedure.
B) Client B that does updates on 1 table common with A's inserts and 1 not affected by A at all (second one is inserted into by B).
C) Client C that polls table only inserted to by A and reacts by inserting into it's own table not affected by others.


The problem.
===========

When A Inserts data into database and B and C is running, then it sometimes happens that A gets a deadlock when creating (INSERTING) the data into
the database. Please note that B cannot work on data UNTIL A has inserted it, thus B does not have affect on this. Thus the only client that
is suppose to affect this process is C. But C only reacts on newly INSERTED data. After data is process by it is DELETED from table (All tables
has UNIQUE identifiers and primary keys).

Can this be related to the transaction type (isolation) or just bad coding beeing missed somewhere ?

Information about database and machines
--------------------------------------------------------------
Version : Interbase 5.6
OS : Windows NT & 2000
DB Size : From 400 mb till under 4GB.
Force writes is ON

Thanks in Advance for any help and time.


Johannes Pretorius
(Programeerings Departement- Promed)

Tel : +27 11 607-3300
Faks : +27 11 622-6939
webtuiste : http://www.promed.co.za

VRYWARING

Hierdie e-pos en enige toepaslike aanhangsels is vertroulik, regsgepriviligeerd en deur landswette
beskerm. Geliewe daarop te let dat die inhoud van hierdie e-pos van 'n persoonlike aard is en
vir die uitsluitlike aandag van die geadresseerde bedoel is. Dit mag onwettig wees om enige gedeelte
van die inhoud van hierdie e-pos te gebruik, te reproduseer of vir eie gewin aan te wend. Indien
hierdie e-pos u per abuis bereik het, word u versoek om die sender onmiddelik te verwittig via e-pos
of deur (011) 607 3300 te skakel en die boodskap te vernietig. Promed vereenselwig hom
nie noodwendig met die opinies van die sender van hierdie boodskap nie en doen afstand van enige
aanspreeklikheid vir enige aksies wat geneem word op grond van inligting wat in die e-pos vervat
word, tensy dit op skrif bevestig word. Alhoewel die nodige stappe gedoen is om te verseker dat
die e-pos virusvry is, kan Promed geen aanspreeklikheid aanvaar vir die verlies of skade wat
voortspruit uit virusse in hierdie e-pos of sy aanhangsels nie.

DISCLAIMER

This e-mail and any attachments to it is confidential, may be subject to legal privilege and is
protected by law. Kindly take note that this e-mail is sent for the personal attention of the intended
recipient. It may be unlawful to use, copy, forward or disclose any of of the contents of this e-mail.
If you have received this e-mail in error, please advise us immediately via e-mail or telephone (011)
6073300 and delete this e-mail and its attachments from your computer. Promed gives no warranties
and exclude any liability for the content of this e-mail, or for the consequences of any
actions taken on the basis of the information provided in this e-mail or its attachments, unless that
information is confirmed in writing. Promed does not ratify any opinion of the sender and although we
have taken reasonable precautions to ensure that no viruses are present in this e-mail, we cannot
accept responsibility for any loss or damage arising from the viruses in this e-mail or attachments.


----------



No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 19/06/2006


[Non-text portions of this message have been removed]