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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select... for update (nowait)

Re: Select... for update (nowait)

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 01 Feb 2000 15:59:41 -0500
Message-ID: <38ie9scc1fjphdkm5hfpm85c39e09mggbq@4ax.com>


A copy of this was sent to "Maxime Tardif" <maxime.tardif_at_cgi.ca> (if that email address didn't require changing) On Tue, 1 Feb 2000 15:36:46 -0500, you wrote:

>I use Oracle 8i enterprise database. With my first session, I write this
>SQL statement:
>"select * from po_cat where po_cat_id =1 for update nowait;"
>
>With an other session, I update this record. The updating process lag and
>it executes when the first connection commit or rollback. I use the nowait
>option and want that process return an exception (the record is busy...).
>
>Why nowait option doesn't work ? and how I can resolve this problem ?
>

The "nowait" applies to the select -- it has no effect on other sessions.

If you do not want the update to block -- the updater should do a select for update nowait before updating.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Feb 01 2000 - 14:59:41 CST

Original text of this message

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