Re: [Q] How to track down a sequence issue?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 12 Aug 1998 15:44:27 GMT
Message-ID: <35d5b7d5.10441073_at_192.86.155.100>


A copy of this was sent to dover_at_world.std.com (Benjamin G Bielak) (if that email address didn't require changing) On Wed, 12 Aug 1998 15:04:56 GMT, you wrote:

>One of our sequences is jumping every once in a while by 20. Apparently
>it is not possible to set up a trigger against a sequence. We are using
>ORACLE 7. I was wondering if anyone has an idea about how one might be
>able to track down a sequence issue like this. We have reviewed all the
>code that calls NEXTVAL on this sequence and nothing jumps out at us as
>an obvious candidate for the cause of this issue.
>
>TIA
>
>Benjamin Bielak Jr.
>dover_at_world.std.com

sequences are cached in the server. by default if you just have:

SQL> create sequence myseq;

it will be created CACHE 20. Things that will make it 'jump'

  • shutdown/startup -- you jump over the cached values.
  • normal aging of objects out of the shared pool. the sequence gets aged out and you jump over the values.

if you really can't live with the 20 jump, you can

SQL> create sequence myseq nocache;

but that'll slow down sequence access (every operation will update the sequence database table not every 20 (or N))

or you can try increasing the shared pool to see if it was getting aged out.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Aug 12 1998 - 17:44:27 CEST

Original text of this message