Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Deadlock

Re: Deadlock

From: Brian P. Mac Lean <brian.maclean_at_teldta.com>
Date: 1997/05/08
Message-ID: <337235FC.1521@teldta.com>#1/1

Yeo Kok Tiong wrote:
>
> Is there any way to set timeout for row lock ? What are the ways to
> rectify deadlock ?

ROWLOCK: No. If you have that much of a problem with users waiting on other users start coding with "select column_name from table_name for update of column_name nowait". You will time out immediately. If you wish you can put it in a loop for 'n' tries.

DEADLOCK: If I remember right, Oracle will automatically detect two-way deadlock and return an error to one of the users involved. I believe the last time I tested three-way deadlock Oracle failed to detect it. In short, if you code right, deadlock should never occur (see Oracle7 Server Concepts manual)

If all you have is a tree of users (see $ORACLE_HOME/rdbms/admin/ utllockt.sql) locking each other, terminate the top level locker with a UNIX “kill” command or the Oracle “alter system kill session” command.

Brian P. MacLean
brian.maclean_at_teldta.com Received on Thu May 08 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US