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

Home -> Community -> Usenet -> c.d.o.server -> Re: Locks rows

Re: Locks rows

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Tue, 21 Jan 2003 18:13:15 +1100
Message-ID: <sg6X9.29286$jM5.75377@newsfeeds.bigpond.com>

"Pablo Sanchez" <pablo_at_dev.null> wrote in message news:Xns930996FBEE82Cpingottpingottbah_at_216.166.71.233...
> "Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in
> news:ZDZW9.28988$jM5.74139_at_newsfeeds.bigpond.com:
>
> > Who can say? His post says he wants to stop two people simultaneously
> > *selecting*.
>
> Correct! I was reading into it that perhaps he was needing to
> implement SERIALIZABLE access. But you're right, I have no idea so
> was hazzarding (probably incorrect) a guess. :)
>
> > But that's an application coding issue. If he's talking about
> > selecting via SQL*Plus, then the select for update trick isn't going
> > to work, no?
>
> Not sure what you mean 'cuz in SQL*Plus, I can issue a 'select for
> update' in one shell and do the same command in another shell and one
> blocks the other -- as expected.

Yes, but what I meant was: how can you *predict* that Bilbo will issue a 'select ... for update" when Sam has issued a prior 'select ... for update'. You can't *force* the issue. Whereas, if this was the usual sort of superb Access front end that I knock up for a mere smidgen of cash, VAT no questions, then I could damn well code in the fact that you couldn't issue a virginal select.

>
> However, as you point out, if one of the accesses is a 'select' rather
> than a 'select for update' I can access the data.
>
> On a related note, plz help me understand something that I've been
> meaning to figure out but since I have your ear (okay, eyes really!)
> I'll run it by ya .. Oracle is tracking the 'select for update' in the
> data block (INIT TRANS right?). Is that information actually flushed
> to the redo log or are INIT TRANS in-memory buckets set aside to track
> the select for updates?

Damn good question. Let me slightly re-phrase it this way: does a 'select for update' generate redo?

My best guess is that no it doesn't, since after an instance recovery you would not expect certain rows to be locked. But, how to prove this? As I say, good question, and a test will be forthcoming.... tomorrow.

Sorry. But I've been off work with the 'flu this week, and I just don't feel up to knocking up a demonstration right now.

Regards
HJR
>
> Thx!
> --
> Pablo Sanchez, High-Performance Database Engineering
> http://www.hpdbe.com
Received on Tue Jan 21 2003 - 01:13:15 CST

Original text of this message

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