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 -> Re: Sequence numbers jumping

Re: Sequence numbers jumping

From: Rafael Cayama <prime_at_telcel.net.ve>
Date: 1997/09/28
Message-ID: <01bcaa43$85c5e140$622d30ce@telcel.telcel.net.ve>#1/1

This happens because you created the sequence by default, without specify the cache parameter. Oracle by default set this to 20. Each time you request a sequence number, the Rdbms caches 20, (to be used in the same session), i.e. if you use 4 sequence numbers and disconnect the session, you will lost the 16 remaining sequence numbers. If you process only one sequence number per request you will be always jumping by 20. Fix it using the command:

SQL> alter sequence <seq_name> nocache;

Rafael Cayama

Fenella Tan <fenella_at_voicenet.com> wrote in article <342EF476.CB9D9919_at_voicenet.com>...
> We're having problems with our sequence numbers. For some reason, they
> seem to be jumping up by 20 instead of the specified increment by 1.
> Any ideas on what may cause this ? We're using Oracle 7.3 on UNIX with
> a Visual Basic front-end. The jumps happen intermittently. It'll work
> (increment by 1) for a few records, and then it'll suddenly go up by 20
> again. Appreciate any input.
>
> Fenella
>
>
Received on Sun Sep 28 1997 - 00:00:00 CDT

Original text of this message

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