Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequence - Cache expire ?
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