Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sequence count not correct

Re: sequence count not correct

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 3 Aug 1999 08:25:33 GMT
Message-ID: <7o691t$ro3$2@news.seed.net.tw>

Steffi <steffi_at_planet.de> wrote in message news:378DD03E.5BB5F71A_at_planet.de...
> hi everybody.
>
> In my tables I use as ID a sequence.
>
> If I insert (nr.nextval) it's ok...the sequence is 1 to 5. Yes it's ok
>
> But if I stop and start my database already then my sequence
> is 21 and not 6. hm..I don't understand this. Can anybody help me??

The reason is that you did NOT shutdown database NORMALLY. You definitely restart the OS, not the database. It's not a good practice at all.
It causes Oracle to SHOTDOWN ABORT, so the cached sequence value will be lost.

The way to avoid is to shutdown Oracle normally before you shutdown OS. The passive way is to create sequence using NO CACHE option. Received on Tue Aug 03 1999 - 03:25:33 CDT

Original text of this message

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