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 -> Resource busy when doing SQL UPDATE

Resource busy when doing SQL UPDATE

From: Mirza Mohsin Beg <mbeg_at_netearnings.com>
Date: Tue, 01 Jun 1999 14:12:18 -0700
Message-ID: <37544CB2.A0E46C2B@netearnings.com>

I have a slight problem when trying to do batch updates on thousands of rows of a single table. But the problem is that some rows might be locked by some other sessions/processes when I make the UPDATE call.

The problem then with UPDATE is that, it hangs (resource contention) because atleast 1 row is locked by some other process.

Any workaround (what I really want to do is update only the rows that I can lock.....is anyway to do something like the following...???)

update some_table a
set a.column1 = 'xxxx'
where a.primary_key in (select b.primary_key

                                       from  some_table b
                                       where b.column2 = 'yyy'
                                       for update nowait)
;

-M
ps: please email me directly also Received on Tue Jun 01 1999 - 16:12:18 CDT

Original text of this message

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