This one is urgent..... Run out of sequence maxval
407048Jun 21 2004 — edited Jun 22 2004I 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