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: Sequence nextval problem

Re: Sequence nextval problem

From: Van Messner <vmessner_at_netaxis.com>
Date: Tue, 9 Mar 1999 18:26:56 -0500
Message-ID: <0ciF2.584$V%.547@news6.ispnews.com>

    There is an init.ora parameter which tells Oracle how many different sequences to cache. Then, when defining your sequences you can decide how many sequence values to cache (if any) for each sequence you create. You lose sequence values when:
1) You have an abnormal shutdown - shutdown abort for example. Any cached values are gone.
2) You rollback transactions which used sequence values. Those rolled back are gone.
3) You have an init ora parameter which caches N sequences. When you use sequence N+1one of the sequences in the cache will be aged out - an lru algorithm - and the unused cached values of the aged out sequence will be lost.

    Thus there is no way you can be sure never to lose a value in a sequence.

Van

Vincent Croquette wrote in message <7c37rq$v3q$1_at_minus.oleane.net>...
>When I select the nextval of a sequence, I sometimes get the previous value
>+ the sequence cache size (def 20)
>
>Ex : Sequence.Nextval => 1
>Sequence.Nextval => 2
>Sequence.Nextval => 22 !!!!
>
>Thanks in advance to anyone could help
>
>
Received on Tue Mar 09 1999 - 17:26:56 CST

Original text of this message

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