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

You're trying to drop an object that is inside the recycle bin (+10g).



If this is due to a generated script to drop everything, do not include objects inside the recyclebin.eg:


SQL> create table test(n varchar2(1));

Table created.

SQL> drop table test;

Table dropped.

SQL> select * from user_recyclebin;

OBJECT_NAME ORIGINAL_NAME OPERATION
------------------------------ -------------------------------- ---------
TYPE TS_NAME CREATETIME
------------------------- ------------------------------ -------------------
DROPTIME DROPSCN PARTITION_NAME CAN CAN
------------------- ---------- -------------------------------- --- ---
RELATED BASE_OBJECT PURGE_OBJECT SPACE
---------- ----------- ------------ ----------
BIN$BsQQFNUBE7jgRAAAAAAAAA==$0 TEST DROP
TABLE USERS 2005-11-30:09:24:34
2005-11-30:09:24:40 8.3374E+12 YES YES
56784 56784 56784 8

SQL> drop table "BIN$BsQQFNUBE7jgRAAAAAAAAA==$0";
drop table "BIN$BsQQFNUBE7jgRAAAAAAAAA==$0"
*
ERROR at line 1:
ORA-38301: can not perform DDL/DML over objects in Recycle Bin

You can make changes to your script to exclude the objects inside the recycle bin:


select 'drop ' || object_type || ' "' || object_name || '";' from user_objects
where object_name not in (select object_name from user_recyclebin);

Or you can purge the recyclebin:

SQL> purge recyclebin;

Recyclebin purged.

SQL> select * from user_recyclebin;

no rows selected



Did not find what you were looking for? Search the internet.
Forum Messages
12-FEB-2008 05:03:47Is select Dml or notankur gupta Reply
with example
only one answer yes or no
Add your message for ORA-38301
Name:email:
Validation Code:v22i6c7j6z4hkiqyi
Enter Code above:
Title:
State your problem: