Transaction Problem

Posts   
 
    
Sink
User
Posts: 27
Joined: 23-Mar-2004
# Posted on: 18-Jan-2005 18:19:17   

Am having a weird, or maybe not so weird problem.

I have a transaction which needs to reference the same table a few times, as well as others.

It reads a record from this table via an sp, must be sp due to criteria not involving primary key.

On the second read of the table, the sp hangs and eventually times out. I suspect that the sp is doing a table scan and thus failing due to the lock on the first record already in the transaction.

Am I in right-field here ?

P.S. Isolation level of Serializeable, Read-Comitted, Read-Uncomitted all have same results.

Sink
User
Posts: 27
Joined: 23-Mar-2004
# Posted on: 18-Jan-2005 19:29:11   

Problem repaired.

Changed primary key to composite and removed sp and no more problem, even works as Serializeable

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 18-Jan-2005 20:25:48   

Glad it's solved. With hanging transactions, readuncommitted is often the only way.

Frans Bouma | Lead developer LLBLGen Pro