Home » RDBMS Server » Server Administration » Sequnce number jumping in odd fashion
Sequnce number jumping in odd fashion [message #50392] Wed, 13 March 2002 19:51 Go to next message
sugathan
Messages: 4
Registered: March 2002
Junior Member
I have a sequence with definition

SEQUENCE_OWNER SEQUENCE_NAME MIN_VALUE MAX_VALUE INCREMENT_BY C O CACHE_SIZE LAST_NUMBER
------------------------------ ------------------------------ ---------- ---------- ------------ - - ---------- -----------
CODIS AMPEXT_SEQ 1 1.0000E+27 1 N N 20 178

This sequence I am refering thorugh a Pro*C program which run on daily basis. I am using nextval of the sequence and stores this value in a varible in the starting of the program.
But the next day when I am taking nextval it shows increment by more than 1, but by definition it should increment by 1 only.

What is cause of this problem ?
How to resove it ?

Many thanks
Sugathan
Re: Sequnce number jumping in odd fashion [message #50394 is a reply to message #50392] Wed, 13 March 2002 20:26 Go to previous messageGo to next message
seng
Messages: 191
Registered: February 2002
Senior Member
This increment has these posibilities.
- Other user has called nextval.
- Sequence is created with CACHE or NOCACHE or without specified this option (default value - 20 will cache). If any system failure then these cached sequence will lose.

Hope this is helping.
Re: Sequnce number jumping in odd fashion [message #50407 is a reply to message #50392] Thu, 14 March 2002 03:14 Go to previous messageGo to next message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
Your sequence was creted with 'cache' of '20' (check the cache_size column).

Solution: you can recreate the sequence without cache.
Re: Sequnce number jumping in odd fashion [message #50418 is a reply to message #50392] Thu, 14 March 2002 07:36 Go to previous messageGo to next message
Andrew Lenz
Messages: 16
Registered: August 1999
Junior Member
cached numbers of a sequence are placed on the LRU list. once the numbers are agged out of the cache you loose these numbers. If you cannot loose a number you cannot cache a sequence.
Re: Sequnce number jumping in odd fashion [message #50436 is a reply to message #50407] Thu, 14 March 2002 17:55 Go to previous message
sugathan
Messages: 4
Registered: March 2002
Junior Member
This was resolved , since we observed that this number jumping is occuring, while there are database problems. And the values in CACHE are lost. We are going to recreate the sequence in NOCACHE mode.

Thanks for the valuable reply.
Cheers
Previous Topic: Re: PCT_FREE/PCT_USED
Next Topic: Re: PCT_FREE/PCT_USED
Goto Forum:
  


Current Time: Mon Jul 08 11:23:52 CDT 2024