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: View current seq. no.

Re: View current seq. no.

From: Dante <dnotari_at_my-dejanews.com>
Date: Mon, 10 May 1999 08:56:19 GMT
Message-ID: <7h66vj$nla$1@nnrp1.deja.com>


Shirley,
  sorry I can't agree with your last statement.

  of course you can review the current value.

  It is important to understand that you have   a current value for each session using the   sequence and a current value for the DB instance.

  If user A and user B use the sequence, first A, then B,   then A and then B again and so on ... having cache 10   (as an example) defined, you would have

  A:1 B:11 A:2 B:12 A:3

  so what would you expect here to have as the current value ?    3 or 12 ?

  For A it would be 3, for B it would be 12 and for user    C looking at the instance it would be 19

Regards
Dante
In article <b4kkf7nm#GA.154_at_pet.hiwaay.net>,   "Shirley Kwan" <sskwan_at_ingr.com> wrote:
> Yes, it's correct.
> So it means that we don't have a way to review the current value of
the
> sequence unless the cache size is zero !!!
>
> Shirley......
>
> Dante wrote in message <7gvcff$ntn$1_at_nnrp1.deja.com>...
> >Shriley,
> > then you should define what you identify as "current value".
> >
> > LAST_NUMBER would give you the DB wide last sequence number
> > fetched, while sequence.curval would give you the current
> > sequence number of your session.
> >
> > The difference is important and it depends what you are
> > trying to accomplish.
> >
> > Imagine having cache 10, user A fetches, user B fetches
> > for user A it might be 1, for B it might be 11,
> > but the DB can only guarantee that 20 was the last
> > fetched ... if B uses all 10 sequences or not.
> >
> > The real USED last sequence can only be derived from the
> > target you stored the sequence into.
> >
> >Regards
> >Dante
> >In article <eZHYaFCm#GA.154_at_pet.hiwaay.net>,
> > "Shirley Kwan" <sskwan_at_ingr.com> wrote:
> >> LAST_NUMBER shows the current value only if no cache is used !!!
> >>
> >> Prabhakar Narayanan wrote in message
<37312F01.755CC94E_at_clsasia.com>...
> >> >Hi
> >> >
> >> >You can access USER_SEQUENCES table
> >> >
> >> >SELECT SEQUENCE_NAME, LAST_NUMBER
> >> >FROM USER_SEQUENCES
> >> >
> >> >This should give you the desired result
> >> >
> >> >Regards
> >> >
> >> >N.Prabhakar
> >> >
> >> >
> >> >Shirley Kwan wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> Does anyone know that how to view all current value of all
sequences
> >> without
> >> >> changing the value ???
> >> >>
> >> >> Thanks in advance !!!
> >> >>
> >> >> Shirley......
> >> >
> >>
> >>
> >
> >-----------== Posted via Deja News, The Discussion Network ==--------
--
> >http://www.dejanews.com/ Search, Read, Discuss, or Start Your
Own
>
>

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Mon May 10 1999 - 03:56:19 CDT

Original text of this message

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