Reputation:
while doing loaddata fixture, getting error PL/SQL: ORA-02289: sequence does not exist. Django version is 1.11.12.
django.db.utils.DatabaseError: ORA-06550: line 10, column 17: PL/SQL: ORA-02289: sequence does not exist ORA-06550: line 10, column 9: PL/SQL: SQL Statement ignored
in python shell, i can create objects but through fixtures, i couldn't. please help.
Upvotes: 0
Views: 809
Reputation: 143083
I don't know Python, but Oracle doesn't lie. If it says that sequence doesn't exist, then
it exists, but you reference it in a wrong manner. Non-Oracle people tend to use double quotes while referencing Oracle objects. See the demonstration:
SQL> create sequence seq;
Sequence created.
SQL> select seq.nextval from dual;
NEXTVAL
----------
1
SQL> select "seq".nextval from dual;
select "seq".nextval from dual
*
ERROR at line 1:
ORA-02289: sequence does not exist
it exists, but it is owned by someone else (i.e. not the user you're currently connected to), which means that owner has to grant select
on it, and you have to reference it using owner name, e.g. select scott.seq.nextval from dual
(Scott is the owner)
Message says that error happened at
line 10, column 17
so - check that position in code you use and see which option (of the ones I mentioned) helps.
Upvotes: 0