Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

This one is urgent..... Run out of sequence maxval

407048Jun 21 2004 — edited Jun 22 2004
I have a sequence X_seq that had a maxvalue of 65535(set at the time it was created).

But now, when I do

select X_seq.nextval from dual
*
ERROR at line 1:
ORA-08004: sequence X_SEQ.NEXTVAL exceeds MAXVALUE and cannot be instantiated

select X_seq.currval from dual
*
ERROR at line 1:
ORA-08002: sequence X_SEQ.CURRVAL is not yet defined in this session

Interestingly,
SELECT last_number,max_value from user_sequences where sequence_name = 'X_SEQ';

LAST_NUMBER MAX_VALUE
----------- ----------
65536 65535
What I don't understand is that why could the last_number be greated than the max_value and what is this last_number

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 20 2004
Added on Jun 21 2004
10 comments
445 views