Monday, September 29, 2014

Oracle: ORA-38301: can not perform DDL/DML over objects in Recycle Bin

As of 10.2g, Oracle introduced a recycle bin for dropped objects, in order to recover them with flashback.
So, if for example, you drop a table like in
DROP TABLE RADIUS_DB.RADACCT3;
Then you won't be able to drop related contraints that were renamed following the table drop, like BIN$7Cd8os82uGngQAB/AQANPQ==$0

To see objects in recycle bin:
select * from dba_recyclebin order by droptime desc;
To remove the BIN* constraints, you need to remove the dropped table from the recycle bin:
purge table radius_db.radacct3;