You've already been told most of the things. Let me add a few more words.
Your problem looks like the one that happens when people use parameters they don't quite understand. I apologize if I sound impolite, but - that's my impression. Why? Because of the look of that CREATE SEQUENCE
statement.
No living person I know has ever manually written it
- using double quotes around uppercase owner and sequence name,
- nor have they used such a
MAXVALUE
(heck, it is indefinite anyway),
- nor they want to explicitly remind Oracle that default increment is
1
,
- as well as cache (which is
20
by default)
- not to mention other options that are default anyway
Apart from start with
, everything else is default anyway so you could have used
SQL> create sequence tabl_prod_dwh_seq start with 21;
Sequence created.
SQL> select tabl_prod_dwh_seq.nextval from dual;
NEXTVAL
----------
21
SQL> select tabl_prod_dwh_seq.nextval from dual;
NEXTVAL
----------
22
SQL>
and get the same result. So ... have a look at documentation related to your database version, try to follow it, don't do what's not allowed (or undocumented), keep it as simple as possible and you'll be good.