Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Select not locked rows
Hi!
"Rognvald Bjarne" <wear_u_out_at_nospam.hotmail.com> wrote in message
news:4BSm5.4820$XUq6.52822092_at_news.randori.com...
> > > The first is possible--the NOWAIT will select only those rows not
currently
> > > locked.
> > Really?
> >
> > 8.1.5
> > Session #1:
> > SQL1> create table z (i number);
> > Table created.
> > SQL1> insert into z values (1);
> > 1 row created.
> > SQL1> insert into z values (2);
> > 1 row created.
> > SQL1> insert into z values (3);
> > 1 row created.
> > SQL1> commit;
> > Commit complete.
> > SQL1> select * from z where i = 2 for update;
> > I
> > ---------
> > 2
> >
> > Session #2:
> > SQL2> select * from z for update nowait;
> > ERROR:
> > ORA-00054: resource busy and acquire with NOWAIT specified
> > no rows selected
> Check to see if your two rows are locked, and if so, how--by what process,
> etc.
Ok. I checked:
SQL2> select * from z where i =1 or i =3 for update nowait;
I
1 3
Are you still telling me that "the NOWAIT will select only those rows not currently locked"?
Bye Received on Thu Aug 17 2000 - 11:23:15 CDT