Re: how to handle deadlock

From: Thomas B. Cox <tcox_at_netcom.com>
Date: Sun, 23 Oct 1994 19:59:18 GMT
Message-ID: <tcoxCy566v.23q_at_netcom.com>


In article <37bbeb$o4h_at_raffles.technet.sg>, Chua Song Heng <shchua_at_solomon.technet.sg> wrote:
>I am running Oracle 7.0.13 and using Oracle CDE tools. The manual says
>Oracle automatically handles deadlock but my system doesnt behave this
>way. If I am using sqlplus to update a table in one session and I have
>another session using Forms 4 that is also trying to update the same
>record in the table, the PC hangs. What must I set to detect deadlock?

You are mistaken. This is not a deadlock.

The second PC is waiting on a lock. This is because you requested the lock in "wait" mode, i.e. you said the form should wait and keep trying to get the lock until it succeeds.

If the form requests the lock in "nowait" mode, then it would return a message saying it was unable to acquire a write lock on the requested record.

If you have your SQL*Net set to use in-band breaks, then hitting <break> or Control-C on the PC will not interrupt the lock wait; if you configure SQL*Net to use out-of-band breaks then Ctl-C will interrupt the lock wait.

This is not a deadlock, however. Please review the definition of "deadlock" in any competent textbook.

 -Tom

-- 
Thomas Cox         tcox_at_netcom.com

Violence is the use of force to violate the rights of another.  
Self defense, then, is the opposite of violence.
Received on Sun Oct 23 1994 - 20:59:18 CET

Original text of this message