ORA-64603: NEXTVAL cannot be instantiated for SEQ_NOEXTEND

ORA-64603: NEXTVAL cannot be instantiated for SEQ_NOEXTEND

Error
Sequence we make it is noextended state. it will give error during nextval value generation.

SQL> create sequence seq_noextend start with 1 increment by 1 minvalue 1 maxvalue 100 scale noextend;

Sequence created.

SQL> select seq_noextend.nextval from dual;
select seq_noextend.nextval from dual
*
ERROR at line 1:
ORA-64603: NEXTVAL cannot be instantiated for SEQ_NOEXTEND. Widen the sequence by 4 digits or alter sequence with SCALE EXTEND.

Solution:
We need to alter the sequence to extend state.

SQL> alter sequence seq_noextend scale extend;
Sequence altered.

SQL> select seq_noextend.nextval from dual;

NEXTVAL
----------
101296001

SQL> select seq_noextend.nextval from dual;

NEXTVAL
----------
101296002

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.