Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Weird SEQUENCE Problem
I have a sequence that is defined correctly. According to TOAD, the
Last Value generated by the sequence is '21'.
However, when I execute:
SELECT MY_SEQUENCE.NEXTVAL FROM DUAL; The value is '1'. If I do it again, then the value is '2'. Obviously, I can continue to do this until I get the number I want, but why is NEXTVAL returning me the wrong number?
One thing that may help... I believe that the sequence is resetting to '1' when we bring the DB down and restart it. I haven't proven this yet, but this has been a problem that recurs intermittently and that is my theory at this point.
Thanks.
TJ Received on Thu Mar 01 2007 - 09:40:38 CST