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 - Cache expire ?

Re: Sequence - Cache expire ?

From: Richard Foote <Richard.Foote_at_bigpond.com>
Date: Tue, 20 Aug 2002 14:30:33 +1000
Message-ID: <3D61C5E9.11E254CF@bigpond.com>


Hi again Ender,

I believe the only way for cached sequences to be blown away except for the database being shutdown is if the library cache is flushed (although there could other causes).

SQL> create sequence bowie;

Sequence created.

SQL> select bowie.nextval from dual;

   NEXTVAL


         1

SQL> select bowie.nextval from dual;

   NEXTVAL


         2

SQL> alter system flush shared_pool;

System altered.

SQL> select bowie.nextval from dual;

   NEXTVAL


        21

However, losing the odd sequence shouldn't be a problem. If losing numbers is a problem, then sequences is not the right solution (as they are not intended to *guarantee* the availability of each generated number).

Note you can also lose numbers if statements are rolled back or if used in the same way as I used them above.

Cheers

Richard

Ender Wiggin wrote:
>
> Hi,
> Does anyone know when Oracle expires/discards the cache for sequence except
> oracle shutdown/start ? System is Oracle 8i/Solaris. Thanks
Received on Mon Aug 19 2002 - 23:30:33 CDT

Original text of this message

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