NOWAIT

From: Frank <franjoe_at_frisurf.no>
Date: Wed, 7 Mar 2001 21:25:53 +0100
Message-ID: <9Uwp6.9813$t21.262069_at_news3.oke.nextra.no>


Hi!(again)

Perhaps you will encounter the problem that one session is hanging, because it is waiting to get
a row because another session is locking it already.

It might be a good idea to test this early to find a solution in your application.

Then have a look at the variant:

select *
from emp
for update NOWAIT;
..
..

./*as previous posting*/

With "nowait" oracle will give up the statement if it is not able to acquire locks on all rows.
This situation probably must be catched with a exception block (if not your development tool
can catch it, you may look at using a little plsql.

If you don't use NOWAIT oracle will wait very long (probably some setup in the database instance)
before giving up.

Frank. Received on Wed Mar 07 2001 - 21:25:53 CET

Original text of this message