Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence Number Loss
Sean
While your suggestion will help, sequence numbers are NOT designed for the purpose needed here. Any DML statement that uses a sequence number and is then rolled back will cause holes in the sequence numbers. Unfortunately, the only approach that can be used to guarantee every sequence number is used is the old v5 approach of incrementing a value stored in a table somewhere.
Hope this helps.
Pete
Sean Fitzgerald wrote:
> when you created the sequence did you specify an amout of numbers to cache?
>
> for example you can specify a sequence starting at 1 and say "cache 20".
> This will cache the next 20 numbers into memory for
> faster access. However, it is like they are used so if you stop and start
> the db, then you will cache the next 20 numbers at startup.
>
> Specify no cache (the default) when you create a sequence to avoid this.
--
Regards
Pete
Peter Sharman Email: psharman_at_au.oracle.com WISE Course Development Manager Phone: +1.650.607.0109 (int'l) Worldwide Internal Services Education (650)607 0109 (local)San Francisco
"Controlling application developers is like herding cats."
Kevin Loney, ORACLE DBA Handbook
"Oh no it's not! It's much harder than that!"
Bruce Pihlamae, long term ORACLE DBA
![]() |
![]() |