Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Drop Table X results in ORA-02264: Name already used

user2046524May 11 2012 — edited May 25 2012
I have an application that connects to ORA10g2 over ODBC (Oracle-Client 9, 10 or 11). It runs an update-Script against the DB.

Sometimes when it executes "DROP Table X" a rather strange error is retuned: "[HY000,604] [Oracle][ODBC][Ora]ORA-00604: Error occurred on recursive level 1 - ORA-02264 name already used by an existing constraint" (sorry, message translated from german ...)

After a lot of testing, I found this (always running the scripts over ODBC):

I create 999 Tables with one script:
1st table: "Create Table AA_001(X INTEGER NOT NULL);
2nd table: "Create Table AA_002(X INTEGER NOT NULL);
999th table: "Create Table AA_999(X INTEGER NOT NULL);

Then I restarted the application and run a script to drop all these tables (999 commands in the form "Drop Table AA_123;")

And ODBC returns the above error ORA-02264 twice for the first 128 tables, lets say table AA_040 and table AA_080 (the numbers 40 and 80 vary):
Besides the error for table 40, the error is also returned for the tables 40+128, 40+2*128, 40+3*128 and so on ...
Besides the error for table 80, the error is also returned for the tables 80+128, 80+2*128, 80+3*128 and so on ...

- There are no errors, if RecycleBin = OFF;
- There are no errors, if I run these commands in MSAccess/ODBC direct (same PC, same ODBC-Driver);
- There are no errors, if I run the scripts in SQLDevelopper.

Any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2012
Added on May 11 2012
13 comments
1,009 views