ORA-02289: sequence does not exist

User afeef30056

20-09-2007 11:10:09

Hi to all,


i truncated a standard txt table and then imported into it a new txt file. I got such error message and in attachment you find the messages.log file.





Cheers

ChemAxon fa971619eb

20-09-2007 11:21:28

There doesn't seem to be an attachment. Can you add it?


Also, could you describe how you truncated the table.





Tim

User afeef30056

20-09-2007 11:27:32

Hi tim,


sorry, maybe something went wrong....


I truncated the table by oracle command. Note that on the same schema i truncated and then re-imported data from other txt files

ChemAxon fa971619eb

20-09-2007 13:45:15

So this doesn't make much sense to me.


You say that you truncated several tables and most were OK, but one was missing the sequence?


Truncating a table should certainly not lead to the sequence being deleted, and IJC should not delete the sequence unless you were also deleting the table.





Could you look at the sequences in oracle and see if there is any obvious reason.


Try SELECT * FROM USER_SEQUENCES.


The sequence for a table name FOO should be called SEQ_FOO.





If you need to re-create the sequence this is how it would be done in IJC:





CREATE SEQUENCE SEQ_FOO


INCREMENT BY 1 START WITH 1


MAXVALUE 1.0E27 MINVALUE 1 NOCYCLE


CACHE 1024 NOORDER





If you truncated the table starting at 1 should be OK. If you already have data in the table you will need to adjust the START WITH value.





Tim