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: Select not locked rows

Re: Select not locked rows

From: Rognvald Bjarne <wear_u_out_at_nospam.hotmail.com>
Date: Thu, 17 Aug 2000 08:24:52 -0600
Message-ID: <4BSm5.4820$XUq6.52822092@news.randori.com>

"Anatoly Moskovsky" <avm_at_trais.com.ua> wrote in message news:8ng4ao$h6d$1_at_DCS.eurocom.od.ua...
> Hi!
>
> "Rognvald Bjarne" <wear_u_out_at_nospam.hotmail.com> wrote in message
> news:w8Bm5.16319$gUd6.75759780_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.

> > This script is usefull for solving resource busy issues and killing
 unwanted
> > background process made by exclusive lock.
> I need some feature that I could use in an application, without grants on
> SYS's objects.
>
> Bye

If you don't like granting even select on a v$ view, could you not make simpler non-updateable ones in an app DBA schema? Received on Thu Aug 17 2000 - 09:24:52 CDT

Original text of this message

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